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
Hi,
try bjam --toolset=msvc-9.0 address-space=64 this should produce 64bit libs.
regards
F
On Wed, Apr 28, 2010 at 12:28 PM, Christoph Rabel wrote: 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 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 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
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
On 4/28/10 8:34 AM, in article s2i6143c5d61004280534za552537ftc1e4f07d560a3e74@mail.gmail.com, "Ferdinand Urban" wrote:
Hi, try bjam --toolset=msvc-9.0 address-space=64 this should produce 64bit libs.
regards F
On Wed, Apr 28, 2010 at 12:28 PM, Christoph Rabel
wrote:
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
> & __cdecl boost::basic_regex >::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
#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
Are you invoking the bjam with the "Visual Studio 64Bit command Prompt"? Mike Jackson
On 4/28/10 10:27 AM, in article hr9gk4$c74$1@dough.gmane.org, "Vladimir Prus" wrote:
Michael Jackson wrote:
Are you invoking the bjam with the "Visual Studio 64Bit command Prompt"?
This should not matter at all. Boost.Build autodetection of msvc uses registry.
- Volodya
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
Prus" wrote:
Michael Jackson wrote:
Are you invoking the bjam with the "Visual Studio 64Bit command
Prompt"?
This should not matter at all. Boost.Build autodetection of msvc uses registry.
- Volodya
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.
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
nul ' notice: [msvc-cfg] condition: '<toolset>msvc-9.0/<architecture>x86/<address-mode l>', setup: 'call "c:\Programme\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x8 6 >nul ' notice: [msvc-cfg] condition: '<toolset>msvc-9.0/<architecture>x86/<address-mode l>32', 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>6 4', setup: 'call "c:\Programme\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 _amd64 >nul ' notice: [msvc-cfg] condition: '<toolset>msvc-9.0/<architecture>x86/<address-mode l>64', setup: 'call "c:\Programme\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86_amd64 >nul ' notice: [msvc-cfg] condition: '<toolset>msvc-9.0/<architecture>ia64/<address-mod el>', setup: 'call "c:\Programme\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x 86_ia64 >nul ' notice: [msvc-cfg] condition: '<toolset>msvc-9.0/<architecture>ia64/<address-mod el>64', setup: 'call "c:\Programme\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86_ia64 >nul '
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:
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
> & __cdecl boost::basic_regex >::do_assign(char const *,char const *,unsigned int)" (?do_assign@?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boos t@@@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
#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
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
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.
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
Christoph Rabel wrote:
2010/4/28 Michael Jackson
: 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.
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. ;-)
Probably, this is because normally it's not required. Could you post the output with "--debug-configuration" command line option? - Volodya
participants (5)
-
Andrew Holden
-
Christoph Rabel
-
Ferdinand Urban
-
Michael Jackson
-
Vladimir Prus