This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]