Re: shared library not found

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

 



Now I get:

$ gcc dummy.c -nodefaultlibs -L/tools/lib
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../lib64/crt1.o: In function
`_start':
(.text+0x12): undefined reference to `__libc_csu_fini'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../lib64/crt1.o: In function
`_start':
(.text+0x19): undefined reference to `__libc_csu_init'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../lib64/crt1.o: In function
`_start':
(.text+0x25): undefined reference to `__libc_start_main'
collect2: ld returned 1 exit status

Or, if I use the -B switch instead of the -L switch:

$ gcc dummy.c -nodefaultlibs -B/tools/lib
/tools/lib/crt1.o: In function `_start':
(.text+0x12): undefined reference to `__libc_csu_fini'
/tools/lib/crt1.o: In function `_start':
(.text+0x19): undefined reference to `__libc_csu_init'
/tools/lib/crt1.o: In function `_start':
(.text+0x25): undefined reference to `__libc_start_main'
collect2: ld returned 1 exit status

The only way I know to fix this is by issuing something like gcc dummy.c -nostdlib /tools/lib/crt* /tools/lib/libc.so , but that's too much detailed for me.

Any other way?


[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