|
From: K. F. <kfr...@gm...> - 2011-04-28 10:55:11
|
Hi Maxime!
On Thu, Apr 28, 2011 at 4:24 AM, Maxime Lecourt
<max...@gm...> wrote:
> Hi,
>
> I'm having trouble using lp_solve and mingw at the same time.
> I tried compiling a source file including lp_lib.h, and got many errors.
I have been using lp_solve with mingw with no problems that I recall.
>
> After that, I made a special file, as follows :
>
> #include <lp_lib.h>
>
> So that file only includes a lp_solve header.
One quick comment: lp_solve is c, not c++, so (in c++ code) you want
to include the lp_solve header as follows:
extern "C" {
#include "lp_lib.h"
}
>
> when compiling, I get following errors (I cut parts of it, text is about 200
> ligns long) :
>
> Scanning dependencies of target lp_solve5
> [ 9%] Building CXX object
> src/lp_solve5/CMakeFiles/lp_solve5.dir/lp_solve5test.cpp.obj
"CXX object" and "lp_solve5test.cpp.obj" suggest that you are using
c++, so perhaps c vs. c++ is the issue, and using "extern "C"" will
clean things up
If that doesn't work, come back with more questions. As I said, I have
lp_solve working smoothly (with a c++ application) using mingw, so we
ought to be able to get things sorted out for you.
> ...
>
> Regards,
>
> Maxime Lecourt
Good luck.
K. Frank
|