为什么我的OPAL应用程序没有链接?

时间:2011-05-12 10:07:41

标签: c++ voip opalvoip

我在我的应用程序中使用OPAL库(Visual C ++ 2008 Express),我在我的项目的lib文件夹中构建了ptlib和opal的静态版本,一个复杂的ptlibs.lib和opals.lib。我还将ptlib和opal的include directiores复制到我的应用程序的文件夹中。我将lib文件添加到链接器配置中,并将dir包含到项目配置中。

它编译但没有链接。为什么?这是OPAL中的错误吗?

------ Build build:项目:infomat,配置:调试Win32 ------ 编译... MyOpalManager.cpp 链接... 搜索图书馆     搜索d:\ prj \ voip \ ptlib \ Lib \ ptlibs.lib:     搜索d:\ prj \ voip \ opal \ lib \ opals.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ kernel32.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ user32.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ gdi32.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ winspool.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ comdlg32.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ advapi32.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ shell32.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ ole32.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ oleaut32.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ uuid.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ odbc32.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ odbccp32.lib:     搜索C:\ Program Files \ Microsoft Visual Studio 9.0 \ VC \ lib \ msvcprtd.lib:     搜索C:\ Program Files \ Microsoft Visual Studio 9.0 \ VC \ lib \ MSVCRTD.lib:     搜索C:\ Program Files \ Microsoft Visual Studio 9.0 \ VC \ lib \ OLDNAMES.lib:     搜索C:\ Program Files \ Microsoft Visual Studio 9.0 \ VC \ lib \ msvcprt.lib:     搜索C:\ Program Files \ Microsoft Visual Studio 9.0 \ VC \ lib \ MSVCRT.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ quartz.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ strmiids.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ vfw32.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ winmm.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ mpr.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ ws2_32.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ iphlpapi.lib:     搜索C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ lib \ dnsapi.lib:

完成搜索库 链接:警告LNK4098:defaultlib'MSVCRT'与使用其他库冲突;使用 / NODEFAULTLIB:文库

MyOpalManager.obj:错误LNK2019:未解析的外部符号“public:static void * __cdecl PMemoryHeap :: Allocate(unsigned int,char const *,int,char const *)”(?Allocate @ PMemoryHeap @@ SAPAXIPBDH0函数“public:static void * __cdecl H323EndPoint :: operator new(unsigned int)”(?? 2H323EndPoint @@ SAPAXI @ Z)中引用的@Z) MyOpalManager.obj:错误LNK2019:未解析的外部符号“public:static void __cdecl PMemoryHeap :: Deallocate(void *,char const *)”(?Deallocate @ PMemoryHeap @@ SAXPAXPBD @ Z)在函数“public:static void __cdecl H323EndPoint”中引用:: operator delete(void *)“(?? 3H323EndPoint @@ SAXPAX @ Z) MyOpalPCSSEndPoint.obj:错误LNK2001:未解析的外部符号“public:static void __cdecl PMemoryHeap :: Deallocate(void *,char const *)”(?Deallocate @ PMemoryHeap @@ SAXPAXPBD @ Z) d:\ prj \ voip \ infomat \ Debug \ infomat.exe:致命错误LNK1120:2个未解析的外部 构建日志保存在“file:// d:\ prj \ voip \ infomat \ infomat \ Debug \ BuildLog.htm”中 infomat - 4个错误,1个警告 ==========构建:0成功,1个失败,0个最新,0个跳过==========

1 个答案:

答案 0 :(得分:0)

为什么不在与ptlib或opal相同的解决方案中创建项目?有意义的是,那时不需要配置。