|
From: Depo C. <dep...@gm...> - 2011-04-21 05:56:52
|
On 4/16/2011 2:44 AM, John Brown wrote: > Hello Depo Catcher, > > My original response went to your private email instead of the list > so I am sending it again. > > On Fri, 15 Apr 2011 23:09:42 -0500, Depo Catcher wrote > >> Library Path is C:\MinWG\lib >> I took out path and suffix. >> Still errors. >> gcc -LC:\MinGW\lib -p -pg -oTestC.exe TestC.o -llibglfw -llibglfwdll >> c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: >> cannot find -llibglfw >> c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: >> cannot find -llibglfwdll > > > Going back to your original post where you > are trying to link withC:\rhino\data\lib\libglfw.a (static library) or > C:\rhino\data\lib\libglfw.dll.a (import library). You can do this in two > ways: > > 1) Add c:\rhino\data\lib to your library search path and specify > the library as -lglfw: > gcc -Lc:\rhino\data\lib -p -pg -oTestC.exe TestC.o -lglfw > > Note that -lglfw matches libglfw.a *and* libglfw.dll.a. Gcc prefers > to link to shared libraries by default, so libglfw.dll.a will > be selected, unless you add -static to your gcc command line. > > 2) Specify the full name of the library, in which case you do not need > to add the folder containing the library to the library search path. > > gcc -p -pg -oTestC.exe TestC.o c:\rhino\data\lib\libglfw.a > OR > gcc -p -pg -oTestC.exe TestC.o c:\rhino\data\lib\libglfw.dll.a > > In the second case, TestC.exe will require the DLL, which I assume is > called glfw.dll. > > Regards, > Alias John Brown. > > ------------------------------------------------------------------------------ Thanks for your help everyone. This is working now. I just link against the .dll file (without extension) |