Compiling / Linking Boost::RegEx for x64 targets fails
Hi, I used the boost library installer from boostpro to install the 32 bit version on my system. All projects compile and link fine for the 32 bit target in Visual Studio 2005. But when I switch to the x64 platform target, I get linker errors. So I decided to compile boost myself, with the following command: bjam.exe --build-dir=e:\boost-build --build-type=complete --toolset=msvc --address-model=64 and installed the result in a separate lib_x64 folder in the boost installation from boostpro. All projects with the x64 target add this path to the linker settings. The libs are found, but when I compile the project, I get the following linker errors: http://pastebin.com/saQMtFwX All problems seem to be related to the regex library. I then created a complete new project with a simple source code, just for testing purposes: http://pastebin.com/QyQRiQ5p It compiles fine with the w32 target, but not with the x64 target (libary path has been changed accordingly). Is there any known issue when using regex with x64? Do I have to set some variables first to make this link correctly? Andi -- Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief! Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
On Monday, September 27, 2010 7:06 AM, Andi Clemens wrote:
I used the boost library installer from boostpro to install the 32 bit version on my system. All projects compile and link fine for the 32 bit target in Visual Studio 2005.
But when I switch to the x64 platform target, I get linker errors. So I decided to compile boost myself, with the following command:
bjam.exe --build-dir=e:\boost-build --build-type=complete --toolset=msvc --address-model=64
and installed the result in a separate lib_x64 folder in the boost installation from boostpro.
All projects with the x64 target add this path to the linker settings. The libs are found, but when I compile the project, I get the following linker errors:
All problems seem to be related to the regex library.
I then created a complete new project with a simple source code, just for testing purposes:
It compiles fine with the w32 target, but not with the x64 target (libary path has been changed accordingly).
Is there any known issue when using regex with x64? Do I have to set some variables first to make this link correctly?
I have had no issues getting regex working with Windows x64. If I understand correctly, you are using the header files from the boostpro installer and the libraries from the source distribution. Is this correct? Are you certain that your boostpro and source packages are for the same version of boost? Please make sure that you didn't, for example, get boostpro 1.43 and source 1.44. If you still have your source package, it may be worthwhile to set your include path for x64 builds to point to the source package and recompile your program.
I figured out what the problem is. I used this parameter for compiling: --address-model=64 but it should be written like this: address-model=64 bjam didn't spit out any warning, but it doesn't seem to recognize the parameter ans has compiled everything for 32 bit. After recompiling everything without the two dashes, it works fine. Andi On Monday 27 September 2010 18:38:11 Andrew Holden wrote:
On Monday, September 27, 2010 7:06 AM, Andi Clemens wrote:
I used the boost library installer from boostpro to install the 32 bit version on my system. All projects compile and link fine for the 32
bit
target in Visual Studio 2005.
But when I switch to the x64 platform target, I get linker errors. So
I
decided to compile boost myself, with the following command:
bjam.exe --build-dir=e:\boost-build --build-type=complete
--toolset=msvc --address-model=64
and installed the result in a separate lib_x64 folder in the boost installation from boostpro.
All projects with the x64 target add this path to the linker settings. The libs are found, but when I compile the project, I get the
following
linker errors:
All problems seem to be related to the regex library.
I then created a complete new project with a simple source code, just for testing purposes:
It compiles fine with the w32 target, but not with the x64 target (libary path has been changed accordingly).
Is there any known issue when using regex with x64? Do I have to set some variables first to make this link correctly?
I have had no issues getting regex working with Windows x64.
If I understand correctly, you are using the header files from the boostpro installer and the libraries from the source distribution. Is this correct?
Are you certain that your boostpro and source packages are for the same version of boost? Please make sure that you didn't, for example, get boostpro 1.43 and source 1.44.
If you still have your source package, it may be worthwhile to set your include path for x64 builds to point to the source package and recompile your program. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
But when I switch to the x64 platform target, I get linker errors. So I decided to compile boost myself, with the following command:
bjam.exe --build-dir=e:\boost-build --build-type=complete --toolset=msvc --address-model=64
I believe that should be address-model=64 without the "--". HTH, John.
participants (4)
-
Andi Clemens
-
Andi Clemens
-
Andrew Holden
-
John Maddock