jrtplib 和 jthread 帮助

发布于 2024-10-21 20:22:43 字数 1550 浏览 3 评论 0原文

当尝试在我的简单项目上使用 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)" (??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

这是我的主程序:

// 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.libjthread.lib放在哪里?请帮忙...

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...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

凝望流年 2024-10-28 20:22:43

您是否在项目链接器选项下添加了 jrtplib.lib 和 jthread.lib ?

您可以在项目属性页的

“配置属性 -> 链接器 -> 输入 -> 其他依赖项”下执行此操作,并确保包含 lib 文件的目录已添加到您的库路径中:在项目上属性

“链接器->常规->附加库目录”

或全局VS设置下(不适用于VC2010)

“工具->选项”“项目和解决方案->VC++目录->库文件”

在 VC2010 下,您必须编辑项目的属性表。

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.

木森分化 2024-10-28 20:22:43

我发现回答有点晚了,而且我对 Windows 不太熟悉(我更像是 Linux 用户),但前几天我在 Windows 上尝试过 JRTPLIB,在编译示例时遇到了同样的问题在发布模式下,库在调试模式下(我看到你使用调试模式)。希望它能有所帮助。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文