當我嘗試在我的簡單項目中使用jrtplib和jthread進行編譯時,出現一些鏈接錯誤問題。的錯誤是:關於jrtplib和jthread的幫助
Error 4 fatal error LNK1120: 3 unresolved externals C:\Users\Chicko\Desktop\tryout\Debug\tryout.exe
Error 1 error LNK2019: unresolved external symbol "public: virtual __thiscall RTPSession::~RTPSession(void)" ([email protected]@[email protected]) referenced in function _wmain tryout.obj
Error 2 error LNK2019: unresolved external symbol "public: __thiscall RTPSessionParams::RTPSessionParams(void)" ([email protected]@[email protected]) referenced in function _wmain tryout.obj
Error 3 error LNK2019: unresolved external symbol "public: __thiscall RTPSession::RTPSession(class RTPRandom *,class RTPMemoryManager *)" ([email protected]@[email protected]@@[email protected]@@Z) referenced in function _wmain tryout.obj
,這裏是我的主要程序:
// tryout.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <rtpsession.h> //Confused to put "" or <>
#include <rtpsessionparams.h>
#include <rtpudpv4transmitter.h>
int _tmain(int argc, _TCHAR* argv[])
{
RTPSession session;
RTPSessionParams sessionparams;
RTPUDPv4TransmissionParams transparams;
sessionparams.SetOwnTimestampUnit(1.0/8000.0);
transparams.SetPortbase(8000);
return 0;
}
爲了您的信息,我不導入從這些庫中的任何頭文件到我的項目。我在項目設置中使用額外的包含庫,並將`"..\jlib\jthread-1.2.1\src";"..\jlib\jrtplib3.8.2\src"
(這是存儲所有頭文件的文件夾)。我該如何解決?我應該在哪裏放jrtplib.lib
和jthread.lib
?請幫助...
我做了但沒有固定。我把這個''C:\ Users \ Chicko \ Desktop \ tryout \ jlib \ jrtplib-3.8.2 \ Debug \ jrtplib.lib「 」C:\ Users \ Chicko \ Desktop \ tryout \ jlib \ jthread-1.2。 1個\調試\ jthread.lib「'。這種格式是正確的嗎? – 2011-03-11 15:20:29
你不需要絕對路徑,只需要lib名稱。你把它放在鏈接器的依賴關係中?要查看鏈接到exe的內容,可以在鏈接器命令行中指定/ verbose:lib。這將向您顯示輸出窗口中正在鏈接的所有內容。 – Ralf 2011-03-11 17:10:12