site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com I saw your message on the boost list, but since I think it's a bug in GCC, not in Boost, I'll reply here. The CVS sources of the boost framework work around this by using an #ifdef to use static versions of the required symbols instead of an anonymous namespace. It would seem as if gcc doesn't coalesce multiple instantiations of templates what are explicitly instantiated inside an anonymous namespace. At least, that's what's happening with boost. I'm not sure how to reproduce this problem without boost, but it drives me nuts when I have to compile our PC team's code which relies on boost. I'd report it to the FSF if I knew where how. Perhaps I'll write a bug in Apple's bugtracker that shows how to reproduce the issue using boost. I'd suggest you do the same, since I may forget ( I'm on vacation :-) ) In the mean time, try using the CVS version of 1.33.1, which includes a workaround. If that's not possible, edit the file boost/bind/placeholders.hpp line 28 to: #if defined(__BORLANDC__) || defined(__GCC__) or #if defined(__BORLANDC__) || defined(__APPLE__) Ryan On Dec 28, 2005, at 12:03 PM, darwin-dev-request@lists.apple.com wrote: The loader is complaining that some object files have multiply defined symbols, even though the symbol in question is defined inside an unnamed (anonymous) namespace and thus should be local to the translation unit by the C++ standard. I don't get this problem on other systems. I worked around this with the -m flag to the linker ("This flag's use is strongly discouraged" says the man page). Is there a better solution? Is this a known problem? Details: The software has not been refreshed recently, so is a little behind: ... Representative errors: ld: multiple definitions of symbol boost::test_tools::(anonymous namespace)::check_is_close mspathCEntry_test.o definition of boost::test_tools::(anonymous namespace)::check_is_close in section (__DATA,__data) ModelBuilder_test.o definition of boost::test_tools::(anonymous namespace)::check_is_close in section (__DATA,__data) ld: multiple definitions of symbol boost::test_tools::(anonymous namespace)::check_is_small mspathCEntry_test.o definition of boost::test_tools::(anonymous namespace)::check_is_small in section (__DATA,__data) ModelBuilder_test.o definition of boost::test_tools::(anonymous namespace)::check_is_small in section (__DATA,__data) LinearProduct_test.o definition of boost::test_tools::(anonymous namespace)::check_is_close in section (__DATA,__data) LinearProduct_test.o definition of boost::test_tools::(anonymous namespace)::check_is_small in section (__DATA,__data) _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Ryan McGann