It seems to me that the ordering of the libraries / object files given on the command line is significant.
This fails: g++ -lpthread -L. -lext minimal.o -o go minimal.o: In function `main': minimal.cpp:(.text+0x1f): undefined reference to `ext_' collect2: ld returned 1 exit status Whereas this succeeds: g++ -lpthread minimal.o -L. -lmcf_ext -o go here, libext.a is a c-library. -- Summary: gcc refuses to recognize libraries on the command line Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: c94wjpn at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36579