Hi Woei Ling, To compile glpk with msvc++ 6.0 from scratch you should do the following:
1. Download the tarball glpk-4.9.tar.gz (i.e. the most recent version) either from the official GNU ftp site: ftp://ftp.gnu.org/gnu/glpk/ or from some mirror ftp sites; see http://www.gnu.org/order/ftp.html . 2. Unzip and untar the glpk distribution using an appropriate utility like WinZip or WinRar. 3. Enter the subdirectory (folder) where glpk files are placed (i.e. make it the current directory) and run the following command in the command-line mode: nmake /f w32vc6.mak (If you see the message "Bad command or file name", some environment variables used by msvc are not set properly. To set them find and run the file vcvars32.bat which is usually placed in C:\Program Files\MicrosoftVisual Studio\VC98\Bin). To simplify this step, esp. under winxp, I'd recommend you to create the following batch file (named, say, foo.bat) in the glpk directory: call "C:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32.bat" nmake /f w32vc6.mak It can be run just by double-clicking the mouse. 4. Make sure that the compilation is successful running the following command: nmake /f w32vc6.mak check As a result of the compilation there must be two files created in the glpk subdirectory: glpk.lib (the glpk object library) and glpsol.exe (the stand-alone solver utility). 5. In msvc ide you should add to your project the subdirectory 'include' which contains all glpk headers and the object library glpk.lib created on step 3. 6. To make sure that all is working compile and run the small example program 'sample.c' placed in the subdirectory 'ex'. Hope this will help you. Andrew Makhorin _______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
