cppcms有很多未解析的外部符号

cppcms lots of unresolved external symbols

本文关键字:外部 符号 cppcms      更新时间:2023-10-16

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

错误184错误LNK2019:函数"public:void __cdecl booster::regex::assign(class std::basic_string,class std::allocater>const&,int)"中引用了未解析的外部符号__imp_pcre_compile(?assign@regex@助推器@@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错误185错误LNK2019:函数"public:bool __cdecl booster::regex::match(char const*,char const*,class std::vector,class std::allocater>>&,int)const"(?match@regex@助推器@@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错误186错误LNK2019:函数"public:void __cdecl booster::regex::assign(class std::basic_string,class std::allocater>const&,int)"中引用了未解析的外部符号__imp_pcre_fullinfo(?assign@regex@助推器@@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错误187错误LNK2019:函数"public:__cdecl booster::regex::data::data(struct-brower::regex::data const&)"中引用了未解析的外部符号__imp_pcre_malloc(??0data@regex@助推器@@QEAA@AEBU012@@Z) C:\Stuff\Development\CPP\Cppms-1.0.2\build\provider\pcre_regex.obj错误188错误LNK2019:函数__catch$?中引用了未解析的外部符号__imp_pcre_free??0data@regex@助推器@@QEAA@AEBU012@@Z$0 C:\Stuff\Development\CPP\cppcms-1.0.2\build\booster \pcre_regex.obj错误189错误LNK2019:函数"public:__cdecl booster::aio::endpoint::endpoint(class std::basic_string,class std:::allocater>const&,int)"中引用的未解析外部符号__imp_htons(??0endpoint@aio@助推器@@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位编译器的解决方案。当我编译库时,我编译发布版本。

首先,我毫无问题地编译了Zlib1.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的构建没有影响。

如果你对我在做什么还有任何问题,请问,我会在中编辑

询问有关cppcms的问题的最佳位置是在cppcms邮件列表中。在此处注册:https://lists.sourceforge.net/lists/listinfo/cppcms-users

Artyom在那里提供了出色的支持服务。尽管他也是S.O.成员,但并非所有的cppcms开发人员都是,他们中的许多人也在邮件列表上提供帮助。总的来说,你会得到更好的答案,尤其是因为有能力回答的人会更快地注意到你的问题。