I am using the Boost libraries, specifically the Spirit portions, on Mac OS X Panther, using XCode. Every time I try to compile my program with the Boost libraries I get a linker error: ld: warning prebinding disabled because of undefined symbols ld: Undefined symbols: boost::throw_exception(std::exception const&) Even if I link against all the boost libraries that were created, I still can't get this program to link. The documentation talks about the libraries being compiled with or without BOOST_NO_EXCEPTIONS, but they don't indicate that the program won't link in either case. What am I doing wrong? ahp
Did you happen to create a blank project, or do you have more than one target in the project? I find that libraries listed in "Other Linker Flags" at the target level are ignored, and that I need to specify them at the project level. On Mar 6, 2004, at 8:38 AM, Adam H. Pendleton wrote:
I am using the Boost libraries, specifically the Spirit portions, on Mac OS X Panther, using XCode. Every time I try to compile my program with the Boost libraries I get a linker error:
ld: warning prebinding disabled because of undefined symbols ld: Undefined symbols: boost::throw_exception(std::exception const&)
Even if I link against all the boost libraries that were created, I still can't get this program to link. The documentation talks about the libraries being compiled with or without BOOST_NO_EXCEPTIONS, but they don't indicate that the program won't link in either case. What am I doing wrong?
ahp
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
I did start with a blank project, but the libraries appear on the command line. I will try adding them to the project settings. ahp On Mar 6, 2004, at 2:53 PM, GoochRules! wrote:
Did you happen to create a blank project, or do you have more than one target in the project? I find that libraries listed in "Other Linker Flags" at the target level are ignored, and that I need to specify them at the project level.
On Mar 6, 2004, at 8:38 AM, Adam H. Pendleton wrote:
I am using the Boost libraries, specifically the Spirit portions, on Mac OS X Panther, using XCode. Every time I try to compile my program with the Boost libraries I get a linker error:
ld: warning prebinding disabled because of undefined symbols ld: Undefined symbols: boost::throw_exception(std::exception const&)
Even if I link against all the boost libraries that were created, I still can't get this program to link. The documentation talks about the libraries being compiled with or without BOOST_NO_EXCEPTIONS, but they don't indicate that the program won't link in either case. What am I doing wrong?
ahp
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Adding the libraries to the "Other Linker Flags" section of the project had no effect, it just listed the library twice on the command-line. Is there any other information I can provide that would help to debug this problem? ahp On Mar 6, 2004, at 2:53 PM, GoochRules! wrote:
Did you happen to create a blank project, or do you have more than one target in the project? I find that libraries listed in "Other Linker Flags" at the target level are ignored, and that I need to specify them at the project level.
On Mar 6, 2004, at 8:38 AM, Adam H. Pendleton wrote:
I am using the Boost libraries, specifically the Spirit portions, on Mac OS X Panther, using XCode. Every time I try to compile my program with the Boost libraries I get a linker error:
ld: warning prebinding disabled because of undefined symbols ld: Undefined symbols: boost::throw_exception(std::exception const&)
Even if I link against all the boost libraries that were created, I still can't get this program to link. The documentation talks about the libraries being compiled with or without BOOST_NO_EXCEPTIONS, but they don't indicate that the program won't link in either case. What am I doing wrong?
ahp
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Adam H. Pendleton wrote:
I am using the Boost libraries, specifically the Spirit portions, on Mac OS X Panther, using XCode. Every time I try to compile my program with the Boost libraries I get a linker error:
ld: warning prebinding disabled because of undefined symbols ld: Undefined symbols: boost::throw_exception(std::exception const&)
Even if I link against all the boost libraries that were created, I still can't get this program to link. The documentation talks about the libraries being compiled with or without BOOST_NO_EXCEPTIONS, but they don't indicate that the program won't link in either case.
It won't link only if BOOST_NO_EXCEPTIONS is defined, and it _might be_
getting defined implicitly somewhere in config headers (e.g. line 47 in
"boost/config/compiler/gcc.hpp"). I'd check if that's the case:
#include
On Mar 6, 2004, at 11:03 PM, Aleksey Gurtovoy wrote:
It won't link only if BOOST_NO_EXCEPTIONS is defined, and it _might be_ getting defined implicitly somewhere in config headers (e.g. line 47 in "boost/config/compiler/gcc.hpp"). I'd check if that's the case:
#include
#if defined(BOOST_NO_EXCEPTIONS) # error here! #endif
Needless to say, this code caused the #error to fire. What's the solution now? I tried to #undef BOOST_NO_EXCEPTIONS but that's didn't seem to do anything. Do I need to re-build the libraries? ahp
Adam H. Pendleton wrote:
On Mar 6, 2004, at 11:03 PM, Aleksey Gurtovoy wrote:
It won't link only if BOOST_NO_EXCEPTIONS is defined, and it _might be_ getting defined implicitly somewhere in config headers (e.g. line 47 in "boost/config/compiler/gcc.hpp"). I'd check if that's the case:
#include
#if defined(BOOST_NO_EXCEPTIONS) # error here! #endif
Needless to say, this code caused the #error to fire.
Here's the part of our gcc config which causes it: #ifndef __EXCEPTIONS # define BOOST_NO_EXCEPTIONS #endif __EXCEPTIONS is a built-in gcc macro that is defined by default unless you disable exceptions with "-fno-exceptions".
What's the solution now?
Check your command line for "-fno-exceptions".
I tried to #undef BOOST_NO_EXCEPTIONS but that's didn't seem to do anything. Do I need to re-build the libraries?
Not until the test above starts passing (unless you are fine with exceptions support being disabled; in fact, you don't need to rebuild in that case either -- just provide a definition for 'boost::throw_exception' somewhere in your code). -- Aleksey Gurtovoy MetaCommunications Engineering
On Mar 7, 2004, at 1:51 AM, Aleksey Gurtovoy wrote:
Here's the part of our gcc config which causes it:
#ifndef __EXCEPTIONS # define BOOST_NO_EXCEPTIONS #endif
__EXCEPTIONS is a built-in gcc macro that is defined by default unless you disable exceptions with "-fno-exceptions".
What's the solution now?
Check your command line for "-fno-exceptions".
I did have -fno-exceptions defined on the command-line, and I found this last night, and removed it but it still wouldn't compile. However, this morning, after a clean and a rebuild it works now. I appreciate all your help. Thanks! ahp
participants (3)
-
Adam H. Pendleton
-
Aleksey Gurtovoy
-
GoochRules!