将live555变成VS2010中的项目文件

编译库文件:
1.新建一个解决方案live555,并在此解决方案下新建4个项目工程,分别为BasicUsageEnvironment、LiveMedia、Groupsock和UsageEnvironment。新建项目时注意选择 Win32 Static Library。
2. 解压live555-lastest.tar.gz到此解决方案的文件夹下。
3. 往四个项目工程里面的SourceFiles和HeaderFiles中添加live555源码目录下的文件。
4. 点击Project-》setting。选中C/C++中的附加包含目录,把四个项目中的include使用相对路径的方法添加到Additional include directories.我机器上配置的是:
E:\视音频研究\Program\live555\live\liveMedia\include;E:\视音频研究\Program\live555\live\groupsock\include;E:\视音频研究\Program\live555\live\BasicUsageEnvironment\include;E:\视音频研究\Program\live555\live\UsageEnvironment\include;%(AdditionalIncludeDirectories)
5. 注意Debug和Rel版本都需要设置
6. 剩下的就是等VC来编译了


编译测试软件:
  1. 在live目录下有一个testProg,新建一个项目win32Application,添加testMpeg4Streamer.cpp
  2. 点击Project-》Setting,选中C/C++中的附加包含目录,把上述四个lib库相应的头文件相对路径添加进Addition include directories。
  3. 选中Link:input,在Object/Library modules填入 wsock32.lib kernel32.lib advapi32.lib shell32.lib 和生成四个live555的库,在Addition include directories中填入四个库所在的位置,我的配置是:
E:\视音频研究\Program\live555\Debug\BasicUsageEnvironment.lib;E:\视音频研究\Program\live555\Debug\UsageEnvironment.lib;E:\视音频研究\Program\live555\Debug\Groupsock.lib;E:\视音频研究\Program\live555\Debug\LiveMedia.lib;wsock32.lib;kernel32.lib;advapi32.lib;shell32.lib;%(AdditionalDependencies)
  
  4.编译,链接时遇到error LNK2001: unresolved external symbol _main 解决办法 Link下的project option中/subsystem:windows 改成/subsystem:console即可
5、选中c/c++ category:code generation  :use run-time library 选择Debug Multithreaded Dll
否则会报很多unresolved external symbo?l_imp_xx错误


其他:在生成openRTSP的程序的时候需要将playCommon.hh和playCommon.cpp分别加入其头文件夹和代码文件夹,否则会报错。



其他错误:在查找预编译头使用时跳过
环境:VS2010
微软官方解释:
Visual C++ Concepts: Building a C/C++ ProgramCompiler Warning (level 1) C4627Error Message
”: skipped when looking for precompiled header use
While searching for the location where a precompiled header is used, the compiler encountered an #include directive for the include file. The compiler ignores the #include directive, but issues warning C4627 if the precompiled header does not already contain the include file.
解决方案:
1、去掉预编译头
项目->属性->配置属性->c/c++->预编译头->创建使用预编译头->不使用预编译头
2、将包含文件加到预编译头stdafx.h文件中
3、在每个.cpp中包含预编译头stdafx.h文件
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值