Re: Link error '/usr/bin/g++-4.0 failed with exit code 1'
Re: Link error '/usr/bin/g++-4.0 failed with exit code 1'
- Subject: Re: Link error '/usr/bin/g++-4.0 failed with exit code 1'
- From: Stephen Kay <email@hidden>
- Date: Sun, 12 Aug 2012 13:57:06 -0400
- Thread-topic: Link error '/usr/bin/g++-4.0 failed with exit code 1'
>> It seems that all of the symbols in my
>> externally compiled and included library are undefined. Clearly it's not
>> seeing the library, even though I have it included in the project.
>
> See if it is a member of the problem target. (In Xcode 3), select the problem
> target in the popup menu at the upper left so that it is the "active" target.
> Then click the "Detail" tab. Find the included library in the list using the
> search field at the far right of the toolbar. The last column, two concentric
> circles, is the "target membership" checkbox. Make sure it is ON.
Yes, it is included. Also, if I use the Inspector on the library file in the
list, in the Targets tab it shows that it is a member of the Target.
I think this is probably some issue with the way the library is made and
included, because the library is also an imported CodeWarrior project.
I have two CW projects I'm porting to Xcode. One of them is a library that
is included by the other "parent" project.
I'm not sure if it is supposed to be a static or dynamic library. In
CodeWarrior, the Project Type is "Library" with Addressing Mode set to
"dynamic-plc".
After importing into Xcode, the Projects Inspector > Build > Mach O Type is
set to "Static Library". Is this correct?
According to what I've read, if it is a static library, it should have the
suffix ".a". So I set it to that, and it successfully creates libMyLibrary.a
(example).
In the parent project, I've included libMyLibrary.a, and in the inspector
for the library, set the File Type to "archive". But none of the symbols in
the library can be located during linking.
I also just tried, for the heck of it, setting the library project to build
a Dynamic Library, with the extension .dylib. I changed the parent project
to include this dylib into the target, with a File Type of
"compiled.mach-o.dylib" - and this produces the same results. None of the
symbols in the library can be located.
Clearly I've got something wrong, but I'm running out of ideas...
Thanks,
- Stephen
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Stephen Kay
Karma-Lab :: developers of KARMA
http://www.karma-lab.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
_______________________________________________
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