간단한 프로젝트에서 jrtplib 및 jthread를 사용하여 컴파일 할 때 몇 가지 링크 오류 문제가 있습니다. 오류는 다음과 같습니다 당신의 내용jrtplib 및 jthread에 대한 도움말
// 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;
}
, 내 프로젝트에 해당 라이브러리에서 모든 헤더 파일을 가져올 수 없습니다 :
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
여기 내 주요 프로그램입니다. 나는 프로젝트 설정에서 추가 라이브러리를 사용하고 `"..\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 \ Debug \ jthread.lib ". 이 형식이 맞습니까? –
절대 경로가 필요하지 않으며 lib 이름 만 필요합니다. 그리고 이것을 링커 의존성에 넣었습니까? exe에 링크 된 것을 보려면 링커 명령 행에서/verbose : lib를 지정할 수 있습니다. 그러면 출력 창에 링크 된 모든 항목이 표시됩니다. – Ralf