problem linking Objective-C program with gcc-4.0

Stéphane Goujet
Sun Feb 20 11:13:00 GMT 2005


   I first noticed with problem trying to compile GNUstep.

   Let's name an Objective-C program main.m :

 > gcc main.m -lobjc fine.

   If we name the very same program main.c :

 > gcc -x objective-c main.c -lobjc :
a.out: hidden symbol `_Unwind_GetIP' in 
is referenced by DSO
collect2: ld returned 1 exit status

Then if I take the same main.m and process it in 2 steps :

 > gcc -c main.m fine

 > gcc main.o -lobjc the same error message

   Af far as I can tell, those problems did not show up with gcc-3.4.x .
   If you have any idea about the problem and/or the solution...

NB: gcc is 4.0.0 20050213
     computer is an Apple powerpc running Linux 2.4.16

NB2: the computer on which I ran the tests is not the same as this one I 
use to write this e-mail, so I typed the error message with my little 
fingers, which means there can/will be copying errors.

NB3: I have a very small example program if you ask for it, and please 
ask for any piece of information that you think would be useful.

          Stéphane Goujet.

More information about the Gcc-help mailing list