[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] Re: sample.c example compilation error in Visual Studio 2005
From: |
Andrew Makhorin |
Subject: |
[Help-glpk] Re: sample.c example compilation error in Visual Studio 2005 Command Prompt |
Date: |
Thu, 27 Dec 2007 07:41:59 +0300 |
> I am using Visual Studio 2005 Command Prompt to compile this c code.
> For C++ code we use the follwing cl /clr filename but to complie C code I
> used cl /tp sample.c. I first get the following errors glpk.h file not
> found. I copied this file to the root directory where I am compiling the
> sample.c code along with glplib.h and other files. After resolving this I
> get another error sample.obj : error LNK 2019 unresolevd external symbol
> _glp_lpx_set_reference in function_ main .Please advice how to solve this
> issue.
On invoking cl you should additionally specify the directory, where
glpk header files are placed, and the glpk library file, i.e. something
like this:
cl /Ic:\glpk\include yourfile.c c:\glpk\glpk.lib
For more details about cl options see microsoft documentation.
To compile glpk you can use the batch file Build_GLPK_with_VC6.bat
included in the distribution (see directory w32).
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Help-glpk] Re: sample.c example compilation error in Visual Studio 2005 Command Prompt,
Andrew Makhorin <=