Search This Blog

Tuesday, May 18, 2010

cannot find -lgcc_s ???

While compiling ncurses-5.7 in Cygwin with gcc 4.3.4, following error happend:

cannot find -lgcc_s

Some of full commands and errors are following:

/usr/bin/g++ -o demo.exe ../objects/demo.o -L../lib -lncurses++ -static -L../lib -lform -lmenu -lpanel -lncurses -dynamic -I../c++ -I../include -I. -DHAVE_CONFIG_H -I. -I../include -U_XOPEN_SOURCE -D_XOPEN_SOURCE=500 -U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=199506L -DNDEBUG -O2
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lgcc_s

/usr/bin/g++ -o demo.exe ../objects/demo.o -L../lib -lncurses++ -static -L../lib -lform -lmenu -lpanel -lncurses -dynamic -I../c++ -I../include -I. -DHAVE_CONFIG_H -I. -I../include -U_XOPEN_SOURCE -D_XOPEN_SOURCE=500 -U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=199506L -DNDEBUG -O2
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lgcc_s

'-static' option makes gcc to avoid the use of shared libraries. '-static' is supposed to make gcc use -lgcc_s and '-dynamic' to make gcc use -lgcc. Actually, Cygwin and gcc 4.3.4 are not coming with 'libgcc_s.a'. Something's wrong, but I'm not sure here. Anyway, in order to compile, it is necessary to change '-static' to something. For instance, if '-static' was removed, it would be okay!

For more information:

No comments:

Post a Comment

Blog Archive