On 13 Jun, Zack Weinberg wrote: > > C vs. C++ aside, there's a real problem here. The symbols > __libc_init_first and _environ ought to be defined in libc.so; I'd > guess that gcc isn't telling the linker to pull in libc. > > What do you get if you do this: > > gcc -v -o hello hello.c > > [Note I'm not actually on the mailing list, please cc: me on replies.] > > zw
Zack, This is what I get: % gcc -v -o hello hello.c gcc version 2.7.2.3 /usr/lib/gcc-lib/i486-linux/2.7.2.3/cpp -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=7 -D__ELF__ -Dunix -Di386 -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386) hello.c /tmp/ccb01600 GNU CPP version 2.7.2.3 (i386 Linux/ELF) #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/i486-linux/include /usr/lib/gcc-lib/i486-linux/2.7.2.3/include /usr/include End of search list. /usr/lib/gcc-lib/i486-linux/2.7.2.3/cc1 /tmp/ccb01600 -quiet -dumpbase hello.c -version -o /tmp/ccc01600 GNU C version 2.7.2.3 (i386 Linux/ELF) compiled by GNU C version 2.7.2.3. as -V -Qy /tmp/ccc01600 -o /tmp/ccd01600 GNU assembler version 2.9.1 (i486-linux), using BFD version 2.9.1 ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o hello /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc-lib/i486-linux/2.7.2.3/crtbegin.o -L/usr/lib/gcc-lib/i486-linux/2.7.2.3 /tmp/ccd01600 -lgcc -lc -lgcc /usr/lib/gcc-lib/i486-linux/2.7.2.3/crtend.o /usr/lib/crtn.o /usr/lib/crt1.o(.text+0xe): undefined reference to `__libc_init_first' /usr/lib/crt1.o(.text+0x18): undefined reference to `_environ' Thanks for any input. Brian -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]