RE: [Boost-Users] More on static linkage
microsoft has a way to implicitly require the loading of dll's. To disable regex's use of this define BOOST_REGEX_NO_LIB
-----Original Message----- From: Amittai Aviram
[mailto:amittai@amittai.com] Sent: Saturday, February 01, 2003 3:21 PM To: Boost-Users@yahoogroups.com Subject: [Boost-Users] More on static linkage I have been trying to link the boost::regex library to a DLL (Release build) without success and I really need help. I have learned something new. Hitherto, I have put this line right above my code in one of my header files, i.e., within the "#if !defined()" block that prevents duplicate inclusion:
#define BOOST_REGEX_STATIC_LINK
This has no effect on the build whatsoever. The resulting DLL is no bigger and the client will not work if you rename boost_regex_vc6_mdi.dll from its place. You get an error message from the client saying that this file is missing.
If, however, I place the line above as the very first line in a header file, then, instead, I simply cannot compile and build the project at all. The compile error I am getting states that there are "multiply defined symbols"! I.e., the symbols defined in the library are being defined twice.
This is driving me nuts.
Thanks for any help.
Amittai Aviram amittai@amittai.com
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/
----------------------------------------------------------------------- DISCLAIMER: Information contained in this message and/or attachment(s) may contain confidential information of Zetec, Inc. If you have received this transmission in error, please notify the sender by return email. -----------------------------------------------------------------------
--- In Boost-Users@yahoogroups.com, Tom Matelich
microsoft has a way to implicitly require the loading of dll's. To disable regex's use of this define BOOST_REGEX_NO_LIB
Thanks, but, as I mentioned the first time I posted on this problem, I have tried this and it didn't work, either. I have tried this _with_ #define BOOST_REGEX_STATIC_LINK and _without_ #define BOOST_REGEX_STATIC_LINK, _with_ inclusion of the .lib file among the inludes under Projects->Settings->Link and _without_ it, and I always get the same results no matter what I do. Could you please be more specific? Is there anything you might be leaving out? You say to put this line in, right? -- #define BOOST_REGEX_NO_LIB So, in addition to putting this line in _any_ header file -- in just one, I assume -- do I then need to include any other file into the project when building it? Do I need to change anything else in the project settings? So far, merely defining either BOOST_REGEX_STATIC_LINK or BOOST_REGEX_NO_LIB or both has no effect whatsoever. Thanks. Amittai Aviram amittai@amittai.com
specific? Is there anything you might be leaving out? You say to put this line in, right? --
#define BOOST_REGEX_NO_LIB
No I said to define it: go to: project settings-> C++ ->preprocessor -> defines and add any defines you need there (either BOOST_REGEX_STATIC_LINK or BOOST_REGEX_NO_LIB or both depending upon what you want to do). Then clean your project and rebuild everything (if you don't clean your project there's a good chance things still won't work if regex is in your precompiled headers or whatever). John Maddock http://ourworld.compuserve.com/homepages/john_maddock/index.htm
participants (3)
-
Amittai Aviram <amittaiļ¼ amittai.com>
-
John Maddock
-
Tom Matelich