> > >C:\xrcs>E:\Dev-Cpp\bin\gcc -LC:\xrcs\glpk-4.44 sample.o -lglpk -lm > > > > > >gives an error > > > > > >E:\Dev- > > Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot > > find -lglpk > > >collect2: ld returned 1 exit status > > > > > >What's wrong? > > > > I don't use Windows, but I'd try checking your Library path. If I'm > > not mistaken, the GLPK library is built into the src directory. Try > > this as your library path flag: > > > > -LC:\xrcs\glpk-4.44\src > > > > Let us know how it goes. > > > > I've tried. It's the same result.
>> >> Let us know how it goes. >> >I've tried. It's the same result. Well, no one else is chiming in, so I guess you are stuck with me. Maybe a Windows user will help out? Have you actually installed glpk? If so, the library should be in a default location and ready to be linked against. If you haven't done a 'make install' for GLPK, I'd recommend you try that next and then figure out where the library file goes (is it a .dll for Windows?). You shouldn't even need a -L flag if the library is installed in a default location, though you can supply one anyway if you know where the installed library lives. >From the GLPK manual: If the library is installed in the default location /usr/local/lib, the following typical command may be used to link, say, the example C program described above against with the library: $ gcc sample.o -lglpk -lm If the GLPK library is not in the default location, the corresponding directory containing it should be made known to the linker through -L option, for example: $ gcc -L/foo/bar/glpk-4.15 sample.o -lglpk -lm Keep us posted. Joey _______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
