繁体   English   中英

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

[英]Using boost 1_48 with Apache qpid on Windows

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

  1. 内置提升 1.48.0
  2. 将 BOOST_ROOT、BOOST_INCLUDEDIR、BOOST_LIBRARYDIR 等添加到 %PATH% env。 多变的
  3. 安装了 cmakePythonRuby并将它们的路径添加到 %PATH% env。 多变的
  4. 未压缩的 qpid-cpp-0.14.tar.gz
  5. 由于boost文件层次结构的最后更改,应用了来自https://bugzilla.redhat.com/attachment.cgi?id=542165&action=diff的补丁
  6. 重命名了一些,由 qpid 要求,boost 库从libbost_LIBRARY-vc100-mt-1_48.libboost_LIBRARY.lib格式
  7. 在'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-gather\tplibs\qpidc-0.14\src\Release\qpidcommon.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),而不是 static。 将其重命名为其原始名称(带有 lib 前缀)。 接下来,建立一个完整的提升,以产生任何可能的变化

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

如果您有 8 核(如 intel i7),请使用 -j8 以获得较大的加速(完整构建需要 8 分钟),然后安装 boost (bjam toolset=msvc --build-type=complete install)

然后再次尝试重建您的应用程序。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM