ld: "illegal reference for -dynamic code..."
ld: "illegal reference for -dynamic code..."
- Subject: ld: "illegal reference for -dynamic code..."
- From: Jesper Papmehl <email@hidden>
- Date: Mon, 15 Aug 2005 15:22:51 +0200
I'm getting linker errors that I can't figure out how to fix.
I have two separate projects. In the first, I generate a static
library. In the second, I use the static library generated by the
first project to build a framework. The projects have no links or
relations of any kind, I just manually copy the generated .a file
when I rebuild it.
When I try to link the framework, I get the following linker errors:
ld: <path to my lib>/MyLib.a(FileLibImplMac.o) illegal reference for -
dynamic code (section difference reference from section
(__TEXT,__text) relocation entry (433) to symbol:
__ZNSt11range_errorD1Ev defined in dylib: /usr/lib/gcc/powerpc-apple-
darwin8/4.0.0/libstdc++.dylib)
ld: <path to my lib>/MyLib.a(FileLibImplMac.o) illegal reference for -
dynamic code (section difference reference from section
(__TEXT,__text) relocation entry (437) to symbol:
__ZNSt11range_errorD1Ev defined in dylib: /usr/lib/gcc/powerpc-apple-
darwin8/4.0.0/libstdc++.dylib)
ld: <path to my lib>/MyLib.a(FileFunctionsMac.o) illegal reference
for -dynamic code (section difference reference from section
(__TEXT,__text) relocation entry (1661) to symbol:
__ZNSt11range_errorD1Ev defined in dylib: /usr/lib/gcc/powerpc-apple-
darwin8/4.0.0/libstdc++.dylib)
ld: <path to my lib>/MyLib.a(FileFunctionsMac.o) illegal reference
for -dynamic code (section difference reference from section
(__TEXT,__text) relocation entry (1665) to symbol:
__ZNSt11range_errorD1Ev defined in dylib: /usr/lib/gcc/powerpc-apple-
darwin8/4.0.0/libstdc++.dylib)
It is true that there are references to std::range_error in the
static library, but I don't understand why that is a problem.
Does anyone know what I might be doing wrong?
TIA
/Jesper Papmehl
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden