
Hi! I am trying to build a project here with Visual Studio 2008 for a 64 bit platform, but I get a lot errors like the following (building it 32 bit works fine) 1>boosttest.obj : error LNK2001: unresolved external symbol "private: class boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > & __cdecl boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >::do_assign(char const *,char const *,unsigned int)" (?do_assign@?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@AEAAAEAV12@PEBD0I@Z) Here is what I did to build the libs: bjam msvc architecture=x86 address-model=64 stage bjam msvc architecture=x86 address-model=64 install I tried various versions of the above lines, with other parameters, or written differently e.g. (--toolset=msvc) but the end result did not change. Then I added the c:\boost\include\... and c:\boost\lib dir to (Tools -> Options -> VC++ Directories -> Platform x64 Include and Library files) To simplify the problem I created a new project and created a new Configuration for x64 ----- #include "stdafx.h" #define BOOST_LIB_DIAGNOSTIC #include <boost/regex.hpp> #include <string> int main() { boost::regex pat( "bla" ); } ----- I can build above fine in 32 bit mode, using the same(!) lib folder. So I assume, the created libs are 32 bit. (Can I check that somehow?) Any ideas what I might do wrong? Or what I might do to find out where the problem lies? Thanks, Christoph

On 4/28/10 10:27 AM, in article hr9gk4$c74$1@dough.gmane.org, "Vladimir Prus" wrote:
It does every time I try it. I'd be happy to have a set of instructions where it does not matter which one I chose. Here is the command line that I use when I build boost with bjam. bjam.exe toolset=msvc-9.0 --with-test --with-filesystem --with-program_options --with-date_time --with-thread --prefix=C:\Developer\VS9\boost_1_39 variant=release,debug threading=multi link=static runtime-link=shared install Mike Jackson

Michael Jackson wrote:
On 4/28/10 10:27 AM, in article hr9gk4$c74$1@dough.gmane.org,
"Vladimir
Perhaps it only matters if you choose a "Visual Studio" command prompt in the first place? I normally use a standard command prompt (the one found under "accessories" in the start menu) without any trouble.

Hi! My environment is not entirely "normal". When I installed Visual Studio, I did not install support for 64bit. Later, when I tried to add it, the installer did not let me. There are some issues with patches that disrupt the installer. I found that a workaround is to install the Windows 7 SDK. Maybe it doesn't add the required registry keys? I will try with --debug-configuration tomorrow and post the results. If you tell me which registry keys are required I can check them too. Christoph

Hi! With --debug-configuration I removed all not relevant lines: notice: [msvc-cfg] msvc-9.0 detected, command: 'c:\Programme\Microsoft Visual St udio 9.0\VC\bin\cl.exe' notice: [msvc-cfg] msvc-8.0 detected, command: 'C:\Programme\Microsoft Visual St udio 8\VC\bin\cl.exe' notice: will use 'c:\Programme\Microsoft Visual Studio 9.0\VC\bin\cl.exe' for ms vc, condition <toolset>msvc-9.0 notice: [msvc-cfg] condition: '<toolset>msvc-9.0/<architecture>/<address-model>' , setup: 'call "c:\Programme\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 > nul ' notice: [msvc-cfg] condition: '<toolset>msvc-9.0/<architecture>/<address-model>3 2', setup: 'call "c:\Programme\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86
When I cal "vcvarsx86_amd64.bat" first, I get the same output, but it builds correctly. Christoph

On 4/28/10 6:28 AM, in article l2t47e5f0471004280328nc0901912rd168d0daba2ac888@mail.gmail.com, "Christoph Rabel" wrote:
Did you build boost from a "64 Bit" Command Prompt? Using the normal "Visual Studio Command Prompt" sets up for 32 bit compiles. Using the "Visual Studio 64 bit COmmand Prompt will compile 64 bit binaries. This is how I usually do it and it works just fine. Mike Jackson

2010/4/28 Michael Jackson <mike.jackson@bluequartz.net>:
Oh, my. That's it. In my case, since that shortcut is missig(probably because I didn't add 64bit support at initial compiler installation) I started "vcvarsx86_amd64.bat" and rebuild the libs(using above commands). Afterwards it linked fine. THX alot! Maybe a note in the documentation to use the 64bit command prompt or execute the correct vcvars script would be helpful. It seems that this step is so "obvious" that nobody (looked through several blogs) comments on it. ;-) Thx, Christoph
participants (5)
-
Andrew Holden
-
Christoph Rabel
-
Ferdinand Urban
-
Michael Jackson
-
Vladimir Prus