|
Boost Users : |
Subject: Re: [Boost-users] Methods prefixed by cdecl?
From: Andrew Holden (aholden_at_[hidden])
Date: 2010-10-20 13:20:20
On Wednesday, October 20, 2010 11:18 AM, Ven Tadipatri wrote:
> On 10/20/2010 03:37 AM, John Maddock wrote:
>>> I'm using Windows 7 (64 bit) and I'm trying to compile and link
my code
>>> against the regex libraries. It compiles fine, but at link time, it
can't
>>> find any of the methods in the regex library. But the methods it's
looking
>>> for are prefixed by "__cdecl". I've tried compiling my code with the
/Gd
>>> and /Gz options, and neither seemed to work.
>> Are you letting the auto-linking code select the correct regex .lib
file to
>> link against, or are you linking manually?
>>
>> I ask because those are the kinds of errors you may get if you select
the
>> wrong .lib to link to.
> I'm selecting the right .lib file -
libboost_regex-vc100-mt-gd-1_38.lib.
> We're actually using Maven to build our project, and based on the
> debugging output, it's pulling the right library.
> This is the line we used to compile the boost libraries:
>
> bjam toolset=msvc-10.0 variant=debug link=static threading=multi stage
>
> Are there other parameters that need to be specified?
I see you are using a 64-bit build of Windows 7. Are you building a
64-bit
program? If so, you need to add "address-model=64" to the bjam line.
If you
want to keep both 32-bit and 64-bit builds of boost, then also add
"--stagedir=stage64" to keep the 32-bit and 64-bit libraries separate.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net