Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7779306
  • 博文数量: 701
  • 博客积分: 2150
  • 博客等级: 上尉
  • 技术积分: 13233
  • 用 户 组: 普通用户
  • 注册时间: 2011-06-29 16:28
个人简介

天行健,君子以自强不息!

文章分类

全部博文(701)

文章存档

2019年(2)

2018年(12)

2017年(76)

2016年(120)

2015年(178)

2014年(129)

2013年(123)

2012年(61)

分类:

2012-10-25 19:25:00

1. 创建win32控制台应用程序,将librtmp下的文件分成"头文件"和"源文件",分别放置.

2. 将rtmpsrv.c, rtmpsuck.c, rtmpgw.c从项目中移除.
这些功能是暂时不用的。

3. 编译提示: " fatal error C1083: 无法打开包括文件:“stdint.h”: No such file or directory".
解决:
从linux下的系统文件"stdint.h"复制到librtmp文件夹下;
在项目中添加"现有项";
将所有提示的地方改成#include "stdint.h"。

4. 编译提示: " fatal error C1083: 无法打开包括文件:“getopt.h”: No such file or directory ".
解决:
将linux下的文件"getopt.c", "getopt.h"复制到rtmpdump目录下;
将文件添加到现有项目;
将#include改成#include"stdin.h";

5. 错误提示:
fatal error C1083: 无法打开包括文件:“openssl/ssl.h”: No such file or directory 
解决:
在项目属性页->C/C++->预处理器->预处理器定义中添加"NO_CRYPTO"
这样做就是不用RTMPT, RTMPE等协议。

6. error C2081: “off_t”: 形参表中的名称非法
解决:
将zlib下的文件zlib.h zconf.h复制到rtmpdump目录下;


7. 错误提示:
1>rtmpdump.obj : error LNK2019: 无法解析的外部符号 __imp__WSAStartup@8,该符号在函数 _InitSockets 中被引用
1>rtmpdump.obj : error LNK2019: 无法解析的外部符号 __imp__WSACleanup@0,该符号在函数 _CleanupSockets 中被引用
解决:
见链接:

在头文件中加入语句#pragma comment( lib, "ws2_32.lib" )   来显式加载。 即:
#include  
#pragma comment(lib, "WS2_32")

8. 错误提示:
1>rtmpdump.obj : error LNK2019: 无法解析的外部符号 _fseeko64,该符号在函数 _OpenResumeFile 中被引用
1>rtmpdump.obj : error LNK2019: 无法解析的外部符号 _ftello64,该符号在函数 _OpenResumeFile 中被引用

解决:
将定义改成:
#define fseeko fseek
#define ftello ftell

9. 错误提示:
1>rtmpdump.obj : error LNK2019: 无法解析的外部符号 _snprintf,该符号在函数 _main 中被引用

解决:
将snprintf改成"_snprintf"
strncasecmp改成"strncmp"
strcasecmp改成"strcmp"



11. 将所有的在代码中的变量定义改到函数开始处,或是本层{}的开始处,
这是因为VC默认是不支持变量定义随处定义的。

12. 错误提示:
warning C4996: 'setmode': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _setmode. See online help for details.
解决:
将"setmode"改成"_setmode"
将"fileno"改成"_fileno"

编译通过,测试通过
阅读(10073) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~