|
Boost : |
From: Carl Daniel (cpdaniel_at_[hidden])
Date: 2003-04-26 09:04:54
John Maddock wrote:
>> I'm stumped. What do I need to #define to use boost::regex without
> linking
>> any library? Or is that possible? I was under the (obivously
>> incorrect) assumption that defining
>> BOOST_REGEX_NO_EXTERNAL_TEMPLATES would cause the library to include
>> the complete implementation inline (i.e. NOT in the library) - it
>> doesn't seem to have that effect. I was also under the impression
>> that defining BOOST_REGEX_NO_LIB would suppress the automatic
>> selection of a regex library in the link - it doesn't seem to have
>> that effect (in fact, it seems that neither of these have any effect
>> at all).
>>
>> What am I missing?
>
> Define BOOST_REGEX_NO_LIB if you want to link to your own build of the
> library, rather than those built by the makefiles.
Maybe I got my configs confused, but I thought I tried that and when I did,
the link still came up with "unable to open boost_regex_vc7_mdid.lib". I
had to add an explicit /nodefaultlib: to the link and explicitly include the
library I wanted to get an error-free link.
>
> BOOST_REGEX_NO_EXTERNAL_TEMPLATES controls what goes in the lib, not
> whether you need to link to it (there is non template code in there
> as well).
Ah - that's the piece I was missing. I was hoping for a lib-free
configuration, for easier project maintenance (small project, only one
translation unit uses regex, etc).
>
> John.
Thanks!
-cd
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk