命令行编译vs10项目工程

参考网址:

http://www.oschina.net/question/234345_42135

1、

1.1、使用的命令行为:开始-->所有程序--> vs2020 --> Visual Studio Tools --> Visual Studio Command Prompt (2010) 

1.2、显示环境变量的值的语句为:

  echo %include%

1.3、添加环境变量的语句为:

  set include=%include%;添加的新的路径

1.4、观察“C:Program Files (x86)Microsoft Visual Studio 10.0Common7Toolsvsvars32.bat”的内容可见,最主要的 4个环境变量为:

  PATH、INCLUDE、LIB、LIBPATH

ZC: 注意,有时 需要的 lib 被手动的加入到vs10中,不在cpp代码中写,这时编译时 会报错 LNK2019,需要在 cpp 中手动加入代码,如:

#pragma comment(lib, "avcodec.lib")
#pragma comment(lib, "avdevice.lib")
#pragma comment(lib, "avfilter.lib")
#pragma comment(lib, "avformat.lib")
#pragma comment(lib, "avutil.lib")
#pragma comment(lib, "postproc.lib")
#pragma comment(lib, "swresample.lib")
#pragma comment(lib, "swscale.lib")

2、

原文地址:https://www.cnblogs.com/CodeSkill/p/5101464.html