How to build boost to get proper boost::regex configuration?
I've build boost on Windows NT4.0 with following settings: JAM_TOOLSET=VISUALC TOOLS=msvc and until now everything works fine. But when I tried to use boost::regex library I found that I got wrong libraries: I got libboost_regex.lib in four directories: 1) libs\regex\build\bin\libboost_regex.dll\msvc\debug 2) libs\regex\build\bin\libboost_regex.dll\msvc\release 3) libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link- dynamic 4) libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link- dynamic but now when I try to use boost::regex library file regex_library_include.hpp forecs linking against library with name like vc6-re300l.lib. Is there a way to get proper libraries when boost is built or to force compiler to use libboost_regex.lib during linking? Thank you in advance. Best regards Ryszard Niewisiewicz
The regex lib isn't set up to link against the jam generated libs (they all have the same name currently which doesn't help), you can either: 1) Define BOOST_REGEX_NO_LIB so that it doesn't try to link against the lib names it expects. or 2) Build the regex lib using the supplied makefiles - automatic linking will work just fine then.
I've build boost on Windows NT4.0 with following settings:
JAM_TOOLSET=VISUALC TOOLS=msvc
and until now everything works fine.
But when I tried to use boost::regex library I found that I got wrong libraries: I got libboost_regex.lib in four directories:
1) libs\regex\build\bin\libboost_regex.dll\msvc\debug 2) libs\regex\build\bin\libboost_regex.dll\msvc\release
3) libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link- dynamic 4) libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link- dynamic
but now when I try to use boost::regex library file regex_library_include.hpp forecs linking against library with name like vc6-re300l.lib.
Is there a way to get proper libraries when boost is built or to force compiler to use libboost_regex.lib during linking?
Thank you in advance. Best regards Ryszard Niewisiewicz
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
The regex lib isn't set up to link against the jam generated libs (they all have the same name currently which doesn't help), you can either:
1) Define BOOST_REGEX_NO_LIB so that it doesn't try to link against
names it expects. or 2) Build the regex lib using the supplied makefiles - automatic
I was experiencing a similar problem with C++Builder 5.
I got the linker error "Unable to open file 'BCB5RE300L.LIB'"
When I try solution #1, I get a different error:
"Unresolved external
boost::w32_regex_traits<char>::~w32_regex_traits<char>{}'"
Is there a simple solution? Or should I just try building using the
makefiles?
Here is the program I try to compile:
#define BOOST_REGEX_NO_LIB
#include
work just fine then.
<snip>
I was experiencing a similar problem with C++Builder 5. I got the linker error "Unable to open file 'BCB5RE300L.LIB'"
Which means that either the expected lib isn't in your lib search path or doesn't exist.
When I try solution #1, I get a different error: "Unresolved external boost::w32_regex_traits<char>::~w32_regex_traits<char>{}'"
Is there a simple solution? Or should I just try building using the makefiles?
Here is the program I try to compile:
I presume that you manually added the jam produced lib file to your project? Also make sure that you pick the right lib file or the program will crash at runtime!! One good reason to use the supplied makefiles.
#define BOOST_REGEX_NO_LIB #include
bool validate_card_format(const std::string s) { static const boost::regex e("(\\d{4}[- ]){3}\\d{4}"); return regex_match(s, e); } int main(int argc, char* argv[]) { return 0; } The regex lib isn't set up to link against the jam generated libs (they all have the same name currently which doesn't help), you can either:
1) Define BOOST_REGEX_NO_LIB so that it doesn't try to link against
names it expects. or 2) Build the regex lib using the supplied makefiles - automatic
--- In Boost-Users@y..., "John Maddock"
wrote: the lib linking will work just fine then.
<snip>
I was experiencing a similar problem with C++Builder 5. I got the linker error "Unable to open file 'BCB5RE300L.LIB'"
Which means that either the expected lib isn't in your lib search
doesn't exist.
When I try solution #1, I get a different error: "Unresolved external boost::w32_regex_traits<char>::~w32_regex_traits<char>{}'"
Is there a simple solution? Or should I just try building using
makefiles?
Here is the program I try to compile:
I presume that you manually added the jam produced lib file to your
Finally got it working by running the bcb5.mak file from
libs\regex\build. I just didn't realize that I had to create .lib
and .dll files on my own (I incorrectly assumed that everything I
needed would be in the source). Thanks for your help.
Is there a define that will allow me to use the regex package without
having to generate bcb5re300l.dll? Right now I need the .lib file to
compile, and the .dll file to run.
--- In Boost-Users@y..., "John Maddock"
Also make sure that you pick the right lib file or the program will
runtime!! One good reason to use the supplied makefiles.
#define BOOST_REGEX_NO_LIB #include
bool validate_card_format(const std::string s) { static const boost::regex e("(\\d{4}[- ]){3}\\d{4}"); return regex_match(s, e); } int main(int argc, char* argv[]) { return 0; } --- In Boost-Users@y..., "John Maddock"
wrote: The regex lib isn't set up to link against the jam generated
crash at libs
have the same name currently which doesn't help), you can either:
1) Define BOOST_REGEX_NO_LIB so that it doesn't try to link against
names it expects. or 2) Build the regex lib using the supplied makefiles - automatic
(they all the lib linking will
work just fine then.
<snip>
Is there a define that will allow me to use the regex package without having to generate bcb5re300l.dll? Right now I need the .lib file to compile, and the .dll file to run.
Define both BOOST_REGEX_NO_LIB and BOOST_REGEX_STATIC_LINK when building your app, build the regex source as a static lib using the same defines and settings as your app and add it to your apps dependencies. John Maddock http://ourworld.compuserve.com/homepages/john_maddock/index.htm
participants (3)
-
John Maddock
-
rnicz
-
sean_shubin