本文介绍了无法建立使用STLport库加速的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows上使用MSVC 7.1建设提升1.48.0使用STLport 5.2.1,这里是命令行我运行:

I'm building boost 1.48.0 with STLport 5.2.1 on Windows using MSVC 7.1 and here is the command line I run:

b2 toolset=msvc link=shared threading=multi runtime-link=shared variant=debug stdlib=stlport --layout=tagged stage

我的用户config.jam中的设置,像这样:

My user-config.jam is setup like so:

using msvc : 7.1 ;
using stlport : 5.2.1 : C:/Code/third_party_source/STLport-5.2.1/stlport : C:/Code/third_party_source/STLport-5.2.1/lib ;

我得到关于STLport的几个链接错误。其中之一是这样的:

I get several linker errors relating to STLport. One of them looks like this:

path.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall stlpd
_std::basic_string<wchar_t,class stlpd_std::char_traits<wchar_t>,class stlpd_std::allocator<wchar_t>
 >::basic_string<wchar_t,class stlpd_std::char_traits<wchar_t>,class stlpd_std::allocator<wchar_t> >
(class stlpd_std::basic_string<wchar_t,class stlpd_std::char_traits<wchar_t>,class stlpd_std::alloca
tor<wchar_t> > const &)" (__imp_??0?$basic_string@_WV?$char_traits@_W@stlpd_std@@V?$allocator@_W@2@@
stlpd_std@@QAE@ABV01@@Z)

为什么我不能得到提升使用STLport建设?

Why can't I get Boost building with STLport?

推荐答案

通过几个人Boost邮件列表上的帮助,我能得到提升使用STLport建设。下面是一些说明,我写了为别人已经遇到这个问题:

With the help of a few people on the Boost mailing list, I was able to get boost building with STLport. Below are some instructions I wrote up for anyone else that has run into this problem:

首先确保你编译STLport的你的各自的编译器。然后去工具/建设/ V2目录并编辑文件,用户config.jam中的以下内容:

First make sure you have compiled STLport for your respective compiler. Then go to the tools/build/v2 directory and edit the file user-config.jam to the following:

using msvc : 8.0 ;
using stlport : 5.2.1 : C:/Code/third_party_source/STLport-5.2.1/stlport : C:/Code/third_party_source/STLport-5.2.1/lib-vc8 ;

以上,请确保您使用MSVC和相应的版本正确的绝对路径的STLport。在这个例子中,我使用MSVC8,但将其更改为下表根据您的版本:

Above, make sure you use the appropriate version of MSVC and correct absolute path to STLport. In this example I'm using MSVC8, but change it to your version per the following table:

Visual Studio .NET 2003        -- 7.1
Visual Studio 2005             -- 8.0
Visual Studio 2008             -- 9.0
Visual Studio 2010             -- 10.0
Visual Studio 11               -- 11.0

同样,对于使用STLport的线,请确保您指定的STLport相应版本。在这里,我使用的版本5.2.1。接下来的参数是路径的STLport包括目录(相应的改变),第三个和最后一个参数是的路径被 编译MSVC 的。

Similarly, for the using stlport line, make sure you specify the appropriate version of STLport. Here I am using version 5.2.1. The next parameter is the path to the stlport include directory (change accordingly) and the third and final parameter is the path to the STLport libraries that are COMPILED FOR THE SAME VERSION OF MSVC.

一旦用户配置文件是安装程序,现在你可以通过调用下面的命令建造的推动作用。

Once the user config file is setup, now you can build boost by invoking the following commands.

有关DEBUG:

b2 toolset=msvc link=shared threading=multi runtime-link=shared variant=debug stdlib=stlport define=_STLP_DEBUG --layout=tagged stage

发布

b2 toolset=msvc link=shared threading=multi runtime-link=shared variant=release stdlib=stlport --layout=tagged stage

我缺少的重要变化是调用 B2 定义= _STLP_DEBUG 选项。

这篇关于无法建立使用STLport库加速的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 00:30