|
From: Greg C. <chi...@co...> - 2006-03-22 13:36:58
|
On 2006-3-22 13:00 UTC, Chris Share wrote: > > Michael Gerdau wrote: > >>> c:\programming\c++\g++> g++ Test.cpp -o Test.exe -lglut32 >>> C:\DOCUME~1\CHRIS~1.LAP\LOCALS~1\Temp/ccaecaaa.o(.text+0x11c):Test.cpp: >>> undefined reference to `__glutInitWithExit@12' [...] >> >> In your previous post you had the problem thet libglut32.a had not >> been found by the linker. The above output shows that this problem >> is solved by the change of name (-llibglut32 -> -lglut32). That is, when the linker sees -lXYZ it looks for libXYZ.a Actually, the msw version looks for some other files too: http://sourceware.org/binutils/docs-2.16/ld/WIN32.html But if you say '-llibXYZ', it looks for 'liblibXYZ.a', which is unlikely to exist. There actually is a library called 'libiberty', though; it has that odd name to make '-liberty' work. Understanding that example is a good way to remember now the name typically gets transformed. > Just to be clear about this, what you're saying means the problem is > that libglut32.a does not "match" glut32.dll--is that correct? Presumably, it does, but the headers you used didn't. |