Adding -lc when linking?

Gerald Pfeifer pfeifer at dbai.tuwien.ac.at
Fri Nov 15 09:05:11 CST 2002


When compiling Wine on FreeBSD, there are tons of warnings of the
following kind (and have been that way since I can remember) which
regularily cause confusion and support requests by people building
our port:

 /usr/bin/gcc -shared  -Wl,-Bsymbolic glu32.spec.o    glu.o  glu32.dll.dbg.o -o glu32.dll.so -L../../dlls  -L../../library -lwine -L/usr/X11R6/lib  -lSM -lICE -lXxf86dga -lXxf86vm -lXv -lXext -lX11  -lGL -lGLU -lm
 /usr/lib/libgcc.a(_op_vdel.o): In function `__builtin_vec_delete':_op_vdel.o(.text+0x45): undefined reference to `free'
 /usr/lib/libgcc.a(_op_delete.o): In function `__builtin_delete':_op_delete.o(.text+0x45): undefined reference to `free'
 /usr/lib/libgcc.a(_op_new.o): In function `__builtin_new':_op_new.o(.text+0x1aa): undefined reference to `malloc'
 /usr/lib/libgcc.a(exception.o): In function `__eh_alloc': exception.o(.text+0xa5): undefined reference to `malloc'
 /usr/lib/libgcc.a(exception.o): In function `__eh_free': exception.o(.text+0xc9): undefined reference to `free'
 /usr/lib/libgcc.a(tinfo2.o): In function `type_info::before(type_info const &) const': tinfo2.o(.text+0x14): undefined reference to `strcmp'

Alfred (Cc:ed) verified that these warnings can be eliminated by

 o getting rid of the -Wl,-Bsymbolic option (which you probably want
   to keep to actually get warnings linking symbols are hosed), or

 o explicitly adding -lc.

Would you mind making one of these changes (neither should break
GNU/Linux)?  If not, how should this problem be addressed?

Gerald

PS: Please Cc: Alfred and me when replying, as we are not on this list.
-- 
Gerald "Jerry" pfeifer at dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/




More information about the wine-devel mailing list