Re: thin linking: "file is not of required architecture"
Re: thin linking: "file is not of required architecture"
- Subject: Re: thin linking: "file is not of required architecture"
- From: Peter O'Gorman <email@hidden>
- Date: Tue, 22 Apr 2008 12:18:17 -0500
Philip Hölzenspies wrote:
> This was an over-reduced example, but whether I would want to do this or
> not, the error should DEFINATELY NOT BE that the files is NOT OF
> REQUIRED ARCHITECTURE.
Please don't shout at me.
I have downloaded one of the Xcode-3.1 beta versions so may have a newer
ld version to you. Here is an attempt to reproduce:
mb% echo 'int x=1;' > x.c
mb% echo 'int y=1;' > y.c
mb% echo 'extern int x,y; int main() { return x+y;}' > main.c
mb% cc -dynamiclib -o libx.so x.c
mb% cc -dynamiclib -o liby.so y.c
mb% ld -r -o z.o libx.so liby.so
ld warning: -arch not specified
mb% cc -c main.c
mb% ld -o main libx.so liby.so main.o /usr/lib/crt1.10.5.o -lSystem
mb% ./main
mb% echo $?
2
mb% ld -v
@(#)PROGRAM:ld PROJECT:ld64-83.2
Now the 'ld warning: -arch not specified' for the ld -r is simply
because there were no actual input files (the shared libraries are not
included in the output) so ld could not guess the arch. Linking an
application did not give any warnings.
Peter
--
Peter O'Gorman
http://pogma.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