在Windows上使用带有Apache qpid的boost 1_48

Using boost 1_48 with Apache qpid on Windows

本文关键字:qpid boost Apache Windows      更新时间:2023-10-16

>我在尝试使用 Visual Studio 2010 编译带有 boost 1_47_0qpid c++ 时卡住了。这是我制作的步骤序列:

  1. 内置助推器 1.48.0
  2. 将BOOST_ROOT、BOOST_INCLUDEDIR、BOOST_LIBRARYDIR等添加到 %PATH% 环境变量中。
  3. 安装了cmakePythonRuby,并将其路径添加到%PATH%环境变量中。
  4. 未压缩的 qpid-cpp-0.14.tar.gz
  5. 由于 boost 文件层次结构中的上次更改而从 https://bugzilla.redhat.com/attachment.cgi?id=542165&action=diff 应用了
  6. 修补程序
  7. 重命名了一些,由 qpid 要求,将库从 libbost_LIBRARY-vc100-mt-1_48.lib 提升为 boost_LIBRARY.lib 格式
  8. 在 'qpidc-0.14' 目录中启动 "cmake -i -G 'Visual Studio 2010'" 并成功接收 *.vcxproj 文件

现在,问题出现了。

我加载了在步骤 7 中创建的"ALL_BUILD.vcxproj"文件,并尝试构建一个项目 - qpidcommon。但是由于"缺少库"错误,我不能。我再次将 boost 库从 libbost_LIBRARY-vc100-mt-1_48.lib 重命名为 boost_LIBRARY-vc100-mt-1_48.lib 文件格式并尝试编译。

而且,至少,我接下来收到了:

...
...
...
(__imp_??0variables_map@program_options@boost@@QAE@XZ) referenced in function 
"public: void __thiscall qpid::Options::parse(int,char const * const *,class 
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" 
(?parse@Options@qpid@@QAEXHPBQBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z)
3>D:wc-gathertplibsqpidc-0.14srcReleaseqpidcommon.dll : fatal error LNK1120: 
33 unresolved externals
========== Build: 2 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

我不知道如何处理这个问题,而无需直接向项目添加库。是吗?

谢谢。

boost_LIBRARY-VC100-mt-1_48.lib 应该是一个导入库(对于 boost_LIBRARY-VC100-mt-1_48.dll),而不是静态库。将其重命名为其原始名称(带有 lib 前缀)。接下来,构建一个完整的提升,以有任何可能的变化

bjam -j8 toolset=msvc --build-type=complete

如果您有 8 核(如英特尔 i7)以获得较大的加速(完整构建需要 8 分钟),请使用 -j8,并安装 boost(bjam 工具集=msvc --build-type=完整安装)

然后再次尝试重新生成应用程序。