搜尋此網誌

2013年11月11日 星期一

How to remove this error("cannot find -lc") in suse linux?

gcc -static -Wall -Wstrict-prototypes -I. -g -DPRINT_OP -g -D__LINUX__   -o test main.o funs.o mmio.o pci.o
/usr/lib/gcc/i586-suse-linux/4.7/../../../../i586-suse-linux/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
make: *** [mvf] Error 1


open Makefile by edit, and then remove

from:
#CFLAGS       := -static -Wall -Wstrict-prototypes $(INCLUDEDIR)

to:
#CFLAGS       := -Wall -Wstrict-prototypes $(INCLUDEDIR)

-static
On systems that support dynamic linking, this prevents linking with the shared libraries. On other systems, this option has no effect. 

沒有留言:

張貼留言