|
From: Maxime L. <max...@gm...> - 2011-04-28 11:52:30
|
Hi,
I've tried including the header with the extern "C" as you suggested, to no
end.
I've also tried renaming my file as lp_solve5.c, to compile with C compiler
(and so removed extern "C"), and I'm still getting the same problem (this
time building a C object).
What version of lp_solve are you using ?
I'm usinf 5.5.2.0, and also tried 5.5.0.15 (win32 already compiled dll for
both), and tried the 5.5.2.0 from source (compiled with the cg++ bat
script).
As a side note, I use CMake to generate my makefiles. I don't think that
should have any influences.
Maxime
2011/4/28 K. Frank <kfr...@gm...>
> 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
>
>
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today. Delivers lowest initial
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> MinGW-users mailing list
> Min...@li...
>
> This list observes the Etiquette found at
> http://www.mingw.org/Mailing_Lists.
> We ask that you be polite and do the same. Disregard for the list
> etiquette may cause your account to be moderated.
>
> _______________________________________________
> You may change your MinGW Account Options or unsubscribe at:
> https://lists.sourceforge.net/lists/listinfo/mingw-users
> Also: mailto:min...@li...?subject=unsubscribe
>
|