Multiply defined symbols with optimization
Multiply defined symbols with optimization
- Subject: Multiply defined symbols with optimization
- From: sinclair44 <email@hidden>
- Date: Tue, 11 Mar 2003 16:07:36 -0500
Hello-
I'm trying to compile/link j-alice from my ProjectBuilder project. It
compiles/links fine on the command line and in my project as long as I have
-O0 set. However, whenever I change the optimization level and recompile, I
get the following linker error:
>
ld: multiple definitions of symbol std::basic_string<char,
>
std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned
>
long)
>
/Users/josh/Desktop/My
>
Developing/BoomBot/build/BoomBot.build/A.L.I.C.E..build/Objects-normal/ppc/Irc
>
Responder.o definition of std::basic_string<char, std::char_traits<char>,
>
std::allocator<char> >::assign(char const*, unsigned long) in section
>
(__TEXT,__text)
>
/usr/lib/gcc/darwin/3.1/libstdc++.a(string-inst.o) private external definition
>
of std::basic_string<char, std::char_traits<char>, std::allocator<char>
>
>::assign(char const*, unsigned long) in section (__TEXT,__text)
This symbol is not defined anywhere in the actual code, but a scan of the
preprocessor output seems to be that it is. With no optimization, however,
the symbol doesn't appear in the object file. But when I turn on
optimization, it's there!
Does anyone know what's causing this weird error?
Thanks,
sinclair44
--
-- sinclair44
[self becomeWorldDictator];
- (void)becomeWorldDictator
{
[[GeorgeBush principalClass] assassinate:[world currentLeaders]];
[[world citizens] terrorize];
[world setCurrentLeaders:[NSArray arrayWithObject:self]];
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.