【问题标题】:Using boost 1_48 with Apache qpid on Windows在 Windows 上使用 boost 1_48 和 Apache qpid
【发布时间】:2012-04-23 10:51:24
【问题描述】:

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

  1. 内置提升 1.48.0
  2. 在 %PATH% 环境中添加了 BOOST_ROOT、BOOST_INCLUDEDIR、BOOST_LIBRARYDIR 等。变量
  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 ==========

我不知道如何处理这个问题,而无需将库直接添加到项目中。你呢?

谢谢。

【问题讨论】:

    标签: c++ boost message-queue qpid


    【解决方案1】:

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

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

    如果您有 8 核(例如 intel i7),则使用 -j8 以大幅加速(完整构建需要 8 分钟),并安装 boost (bjam toolset=msvc --build-type=complete install)

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

    【讨论】:

      猜你喜欢
      • 2012-10-23
      • 1970-01-01
      • 2019-04-21
      • 1970-01-01
      • 1970-01-01
      • 2016-08-11
      • 1970-01-01
      • 2015-04-03
      • 1970-01-01
      相关资源
      最近更新 更多