From: Luke D. <cod...@ho...> - 2003-08-08 11:11:48
|
----- Original Message ----- From: "Stephan Lukits" <st...@lu...> To: <min...@li...> Sent: Friday, August 08, 2003 6:33 PM Subject: [Mingw-users] ld.exe: cannot find -llibwinmm > Hi y'all, > I just startet developing with win32 api and thought it might be a good > idear useing a mingw system. Now I try to run the second example from > the Petzold 5th edition which makes use of WinMM.lib. > Since I didn't find it on my system I where searching for something with > winmm and found libwinmm.a. My first question is: Is libwinmm.a the > mingw equivalent for use with gcc? Yes. > And second question why can't the linker find it. I added the followning > system variable: > LIBRARY_PATH=C:\mingw\lib > Which should make things working according to a linker introduction I > found on the web: > http://webclub.kcom.ne.jp/ma/colinp/win32/tools/link.html First remove that environment variable, because it is not necessary and might cause problems in future (BTW I think that website is very old). > > I also tried coping libwinmm.a to my source directory an calling gcc > like this: > > gcc -mwindows -ohello hello.o -L. -llibwinmm > > which also resulted in a "connot find" error. Use "-lwinmm", because the "lib" part of the name is implicit. For example, to use libwsock32.a you pass "-lwsock32" to the linker. Luke > > Thank you for your time > > best regards > Stephan > > PS a few outputs: > > C:\Programme\eclipse\workspace\HelloWin32>env | grep LIB > LIBRARY_PATH=C:\mingw\lib > > C:\Programme\eclipse\workspace\HelloWin32>gcc --version > gcc (GCC) 3.2.3 (mingw special 20030504-1) > Copyright (C) 2002 Free Software Foundation, Inc. > [...] > > C:\Programme\eclipse\workspace\HelloWin32>ls C:\mingw\lib | grep *winmm* > libwinmm.a |