Rel32 out of range when linking with library built by Xcode, in Xcode
Rel32 out of range when linking with library built by Xcode, in Xcode
- Subject: Rel32 out of range when linking with library built by Xcode, in Xcode
- From: Jay Reynolds Freeman <email@hidden>
- Date: Wed, 22 Sep 2010 18:01:41 -0700
I made a posting about this issue to the Xcode group, thinking it might have to do with build settings, but have received no response, so I am posting here now (without cross-posting), in the hope that perhaps someone knows something useful about the linker ...
I have a 64-bit app that I have been building under Xcode 3.2.4 to run on MacOS 10.6. The app builds and runs fine. Recently I decided to move many of the files used in it into a library, for use in that app and potentially others, and there the trouble began; the library builds fine, and the remaining source code files for the app complile fine, but when linking it all together, I see link-time error messages of the form:
"Rel32 out of range in <one of my functions>"
My app does indeed use so much data that a 32-bit jump is not enough.
I see from the web that this issue has been around for a while, but I cannot find any information as recent as Xcode 3.2.4 and thought I would ask whether there was anything new I can do about the problem. I have the following additional information:
o I did set up the build dependency of the app on the library.
o Both the app and the library are built with the Xcode "architectures" and "valid architectures" build settings both set to x86_64.
o The build and link of the app has "-arch x86_64" in the "Other Linker Flags" build setting. (The build of the library doesn't want it there; documentation indicates that the x86_64 setting from "architectures" is passed to libtool as described in my next bullet point.)
o I have verified with -v that the setting for x86_64 is reaching the command line for both the build of the library and the build and link of the application. In particular, libtool shows up with "-arch_only x86_64" as a flag.
o When I (experimentally) moved all the files from the library back into the application, and then built the library to contain only one simple C++ file (whose entire content is "int foo() { return 1; }"), then the build and link goes fine, and the app runs. The function "foo" is not one that my app actually calls.
o But when I start moving files that contain code that my app uses, back into the library, the above-mentioned out of range errors start to occur.
Any advice?-- Jay Reynolds Freeman --------------------- |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden