读书人

加载LIBRTMP 后出现的链接有关问题!

发布时间: 2014-01-19 01:28:51 作者: rapoo

加载LIBRTMP 后出现的链接问题!!
这是声明 在 VIEW.CPP中


#include "RTMPTestDoc.h"
#include "RTMPTestView.h"
#include "amf.h"
#include "log.h"
#include "rtmp_sys.h"
#pragma comment(lib,"ws2_32.lib")

然后再如下 使用后

void CRTMPTestView::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
RTMP *rtmp;
int setupFlag,connectFlag,streamFlag;
char uri[]="rtmp://localhost/live/livestream";

rtmp = RTMP_Alloc();
if(rtmp == NULL)
AfxMessageBox(_T("alloc failed..."));
else
AfxMessageBox(_T("alloc success..."));

RTMP_Init(rtmp);
setupFlag = RTMP_SetupURL(rtmp, (char*)uri);
if(setupFlag < 0)
AfxMessageBox(_T("setup url failed...\n"));
else
AfxMessageBox(_T("setup url success...\n"));

RTMP_EnableWrite(rtmp);

connectFlag=RTMP_Connect(rtmp, NULL);
if(connectFlag < 0)
AfxMessageBox(_T("connnect failed...\n"));
else
AfxMessageBox(_T("connect success...\n"));

streamFlag=RTMP_ConnectStream(rtmp,0);
if(streamFlag < 0)
AfxMessageBox(_T("connect stream failed...\n"));
else
AfxMessageBox(_T("connect stream success...\n"));
WSACleanup();

CView::OnLButtonDown(nFlags, point);
}

出现链接错误

RTMPTestView.obj : error LNK2019: 无法解析的外部符号 _RTMP_ConnectStream,该符号在函数 "public: void __thiscall CRTMPTestView::OnLButtonDown(unsigned int,class CPoint)" (?OnLButtonDown@CRTMPTestView@@QAEXIVCPoint@@@Z) 中被引用
1>RTMPTestView.obj : error LNK2019: 无法解析的外部符号 _RTMP_Connect,该符号在函数 "public: void __thiscall CRTMPTestView::OnLButtonDown(unsigned int,class CPoint)" (?OnLButtonDown@CRTMPTestView@@QAEXIVCPoint@@@Z) 中被引用
1>RTMPTestView.obj : error LNK2019: 无法解析的外部符号 _RTMP_EnableWrite,该符号在函数 "public: void __thiscall CRTMPTestView::OnLButtonDown(unsigned int,class CPoint)" (?OnLButtonDown@CRTMPTestView@@QAEXIVCPoint@@@Z) 中被引用
1>RTMPTestView.obj : error LNK2019: 无法解析的外部符号 _RTMP_SetupURL,该符号在函数 "public: void __thiscall CRTMPTestView::OnLButtonDown(unsigned int,class CPoint)" (?OnLButtonDown@CRTMPTestView@@QAEXIVCPoint@@@Z) 中被引用
1>RTMPTestView.obj : error LNK2019: 无法解析的外部符号 _RTMP_Init,该符号在函数 "public: void __thiscall CRTMPTestView::OnLButtonDown(unsigned int,class CPoint)" (?OnLButtonDown@CRTMPTestView@@QAEXIVCPoint@@@Z) 中被引用
1>RTMPTestView.obj : error LNK2019: 无法解析的外部符号 _RTMP_Alloc,该符号在函数 "public: void __thiscall CRTMPTestView::OnLButtonDown(unsigned int,class CPoint)" (?OnLButtonDown@CRTMPTestView@@QAEXIVCPoint@@@Z) 中被引用
1>G:\vs2010Program\RTMPTest\Debug\RTMPTest.exe : fatal error LNK1120: 6 个无法解析的外部命令

求大神帮忙解决下 是哪里的问题,,!!
[解决办法]
这是C++问题吧?

读书人网 >Web Service

热点推荐