• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
ld: "illegal reference for -dynamic code..."
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: More Debugging Problems
  • Next by Date: Re: Issues and questions about Xcode 2.1
  • Previous by thread: More Debugging Problems
  • Next by thread: How to setup source trees before xcodebuild invocation
  • Index(es):
    • Date
    • Thread