Relocation error when linking extension
Yury Kovalchuk <[email protected]> Mon, 20 Jun 2005 16:26:41 +0400
| Newsgroups | gmane.comp.mozilla.devel.macosx |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
Hi all! I'm trying to use std::string and nsEmbedString classes in my c++ extension module on Mac, but when I run the build I get this error: ld: /var/tmp//ccPxeloy.o illegal reference for -dynamic code (section difference reference from section (__TEXT,__eh_frame) relocation entry (154) to symbol: nsACString::Assign(char const*, unsigned int) defined in dylib: /Users/mozilla/src/mozilla/firefox-release/dist/sdk/bin/libxpcom.dylib) /usr/bin/libtool: internal link edit command failed. But when I build without using nsEmbedString everything builds just fine. The problem is that I have to convert UTF8 to UTF16 strings to fire notifications through nsIObserverService. What am I doing wrong? Any help will be greatly appreciated. Thank you! Yury Kovalchuk.