Re: problem linking Objective-C program with gcc-4.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux