This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: problem linking Objective-C program with gcc-4.0
- From: Stéphane Goujet <stephane dot goujet at kat dot fi>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 18 Feb 2005 16:35:36 +0200
- Subject: Re: problem linking Objective-C program with gcc-4.0
- References: <4215BD51.2070307@kat.fi>
I answer to myself :
With gcc -v, I can see :
Let's name an Objective-C program main.m :
> gcc main.m -lobjc
...works fine.
collect2 is called with libraries : -lobjc -lgcc_s -lgcc -lc
If we name the very same program main.c :
> gcc -x objective-c main.c -lobjc
collect2 is called with libraries : -lobjc -lgcc_eh -lgcc -lc
So, if I add now this libgcc_s :
>gcc -x objective-c main.c -lobjc -lgcc_s
... works fine !
What are those libraries (libgcc_s, libgcc_eh) ?
Why does gcc try to link with different libraries just because the
file extension is different ?
Why does now (4.0.0) libgcc_eh depend on libgcc_s ? (This is not the
case with a gcc-3.4.x).
Goodbye,
Stéphane Goujet.