开发者

Help on jrtplib and jthread

开发者 https://www.devze.com 2023-02-16 17:30 出处:网络
I have some link error problems when trying to compile using jrtplib and jthread on my simple project. The errors are:

I have some link error problems when trying to compile using jrtplib and jthread on my simple project. The errors are:

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)" (??1RTPSession@@UAE@XZ) referenced in function _wmain  tryout.obj
Error   2   error LNK2019: unresolved external symbol "public: __thiscall RTPSessionParams::RTPSessionParams(void)" (??0RTPSessionParams@@QAE@XZ) referenced in function _wmain tryout.obj
Error   3   error LNK2019: unresolved external symbol "public: __thiscall RTPSession::RTPSession(class RTPRandom *,class RTPMemoryManager *)" (??0RTPSession@@QAE@PAVRTPRandom@@PAVRTPMemoryManager@@@Z) referenced in function _wmain  tryout.obj

and here is my main program:

// 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;
}

For your information, I do not import any header file from those libraries into my project. I use additional include libraries in the project setting and put `"..\jlib\jthread-1.2.1\src";"..\jlib\jrtplib3.8.2\src" (this is the folder where all the headers are stored). How do I fix this? Where should i put jrtplib.lib and jthread.lib? Please help...


Have you added jrtplib.lib and jthread.lib under your project linker options?

You can do this on the project property page under

"Configuration properties->Linker->Input->Additional Dependencies" and make sure that the directory that contains the lib files has been added to your library path: Either on the project properties

"Linker->General->Additional Library Directories"

or under the global VS settings (Doesn't apply to VC2010)

"Tools->Options" "Projects and Solutions->VC++ Directories->Library Files"

Under VC2010 you'll have to edit the property sheet of the project.


I see that it's a bit late to answer and I'm not so expert on Windows (I'm more a Linux user), but some day ago I've tried JRTPLIB on Windows and I had the same problem when I compiled the example in release mode and the lib in debug mode (I see that you use the debug mode). Hope it can help.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号