cppcms许多未解析的外部符号

时间:2012-09-29 22:47:10

标签: c++ pcre zlib cppcms

我在尝试构建cppcms时遇到以下错误。

Error   184 error LNK2019: unresolved external symbol __imp_pcre_compile referenced in function "public: void __cdecl booster::regex::assign(class std::basic_string,class std::allocator > const &,int)" (?assign@regex@booster@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)   C:\Stuff\Development\CPP\cppcms-1.0.2\build\booster\pcre_regex.obj
Error   185 error LNK2019: unresolved external symbol __imp_pcre_exec referenced in function "public: bool __cdecl booster::regex::match(char const *,char const *,class std::vector,class std::allocator > > &,int)const " (?match@regex@booster@@QEBA_NPEBD0AEAV?$vector@U?$pair@HH@std@@V?$allocator@U?$pair@HH@std@@@2@@std@@H@Z)   C:\Stuff\Development\CPP\cppcms-1.0.2\build\booster\pcre_regex.obj
Error   186 error LNK2019: unresolved external symbol __imp_pcre_fullinfo referenced in function "public: void __cdecl booster::regex::assign(class std::basic_string,class std::allocator > const &,int)" (?assign@regex@booster@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)  C:\Stuff\Development\CPP\cppcms-1.0.2\build\booster\pcre_regex.obj
Error   187 error LNK2019: unresolved external symbol __imp_pcre_malloc referenced in function "public: __cdecl booster::regex::data::data(struct booster::regex::data const &)" (??0data@regex@booster@@QEAA@AEBU012@@Z)   C:\Stuff\Development\CPP\cppcms-1.0.2\build\booster\pcre_regex.obj
Error   188 error LNK2019: unresolved external symbol __imp_pcre_free referenced in function __catch$??0data@regex@booster@@QEAA@AEBU012@@Z$0   C:\Stuff\Development\CPP\cppcms-1.0.2\build\booster\pcre_regex.obj
Error   189 error LNK2019: unresolved external symbol __imp_htons referenced in function "public: __cdecl booster::aio::endpoint::endpoint(class std::basic_string,class std::allocator > const &,int)" (??0endpoint@aio@booster@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)   C:\Stuff\Development\CPP\cppcms-1.0.2\build\booster\endpoint.obj

我的环境是Windows 7 64位,使用Visual Studio 2012 Professional和CMake 2.8.9。

对于我编译的所有内容,我配置CMake为VS2012生成解决方案以使用64位编译器。当我编译库时,我编译了发行版本。

首先我编译Zlib 1.2.7没有问题。 其次我编译pcre-8.31没有问题。

然后,当它有时间编译cppcms-1.0.2时,我得到了一堆或错误,正如我之前指出的那样。在CMake中配置cppcms时,我设置了PYTHON 2.7,我使用

 C:/Stuff/Development/CPP/Zlib/zlib-1.2.7/build 
作为我的ZLIB_INCLUDE_DIR,并在其末尾附加/Release/zlibstatic.lib并且你有ZLIB库我我正在使用,但我不确定我的PCRE设置是否正确。

由于PCRE在CMake中有一个include和include2,我不知道该放入什么内容所以我只是做了pcre-8.31根目录和pcre-8.31构建目录。对于PCRE_LIB,我使用pcre-8.31 / build / Release / pcre.lib。

我已删除了库的所有构建目录,甚至重新开始,但我仍然遇到这些问题而且我不确定是什么原因导致它们。后来我意识到cppcms构建目录中的助推器也有一个解决方案,所以我首先构建了它,其中有3个失败的项目,但大多数都成功了,但它对cppcms构建没有任何影响。

如果您对我的工作有任何疑问,请询问,我将在其中进行编辑。

1 个答案:

答案 0 :(得分:2)

提出有关cppcms问题的最佳地点是在cppcms邮件列表中。在此注册: https://lists.sourceforge.net/lists/listinfo/cppcms-users

Artyom在那里提供优质的支持服务。虽然他也是S.O.成员,并非所有cppcms开发人员都是,他们中的许多人也在邮件列表上提供帮助。总的来说,你会得到更好的答案,特别是因为能够回答的人会更快地注意到你的问题。