You probably also need to add the glpk library to the list of inputs in Properties -> Configuration Properties -> Linker -> Input. I suppose that should fix it. It doesn't seem to be a problem with header files, since it gets to the linking stage.<br>
<br>Ted<br><br><div class="gmail_quote">On Mon, Jun 25, 2012 at 4:03 PM, Garton, Timothy W ERDC-RDE-ITL-MS Contractor <span dir="ltr"><<a href="mailto:Timothy.W.Garton@erdc.dren.mil" target="_blank">Timothy.W.Garton@erdc.dren.mil</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ted,<br>
<br>
Thanks for the quick response.<br>
<br>
Is there anything else that has to be setup or included in the project in order to get the project to compile with GMPL. I am still getting the same errors that I had before after using 4.45 and applying the patches as described in the install file. It appears to be some sort of Linker error like there is some other header file that I don't have.<br>
<div class="im HOEnZb"><br>
Thanks.<br>
<br>
Tim Garton<br>
ERDC - ITL<br>
Computer Scientist<br>
<a href="mailto:Timothy.W.Garton@erdc.dren.mil">Timothy.W.Garton@erdc.dren.mil</a><br>
Ph: <a href="tel:%28601%29634-3111x5364" value="+16016343111">(601)634-3111x5364</a><br>
<br>
<br>
</div><div class="HOEnZb"><div class="h5">-----Original Message-----<br>
From: Ted Ralphs [mailto:<a href="mailto:ted@Lehigh.EDU">ted@Lehigh.EDU</a>]<br>
Sent: Thursday, June 21, 2012 4:41 PM<br>
To: Garton, Timothy W ERDC-RDE-ITL-MS Contractor<br>
Cc: <a href="mailto:cbc@list.coin-or.org">cbc@list.coin-or.org</a>; <a href="mailto:john.forrest@fastercoin.com">john.forrest@fastercoin.com</a><br>
Subject: Re: CBC with GMPL<br>
<br>
Yes, there is a specific version of Glpk that will work with each version of Cbc. Check the script get.Glpk in the ThirdParty/Glpk for the correct version number. The trunk version uses 4.45, so we seem to be lagging behind the most recent version of GLPK quite a bit.<br>
<br>
Cheers,<br>
<br>
Ted<br>
<br>
On Thu, Jun 21, 2012 at 12:42 PM, Garton, Timothy W ERDC-RDE-ITL-MS Contractor <<a href="mailto:Timothy.W.Garton@erdc.dren.mil">Timothy.W.Garton@erdc.dren.mil</a>> wrote:<br>
> CBC Team,<br>
><br>
><br>
><br>
> I have been trying to get CBC compiled using Visual Studio 2010. Out<br>
> of the box, the source code compiles properly and I can run the example project.<br>
> When I try to enable GLPK and add the line "#define COIN_HAS_GLPK 1"<br>
> in the config_default.h file of the Cbc project, I begin to get a lot<br>
> of errors. I tried to follow a similar process to the adding GLPK to<br>
> Symphony by adding the include folder path to the glpk.h to the libCbc<br>
> and licCbcSolver projects. I then get a long list of Linker errors. <br>
> I am assuming that the GLPK.lib was not linked to the solution, so I<br>
> added the glpk.lib 32-bit library to the added dependencies of the<br>
> projects. I then get a shorter list of 4 Linker errors.<br>
><br>
><br>
><br>
> error LNK2001: unresolved external symbol "struct glp_prob * cbc_glp_prob"<br>
> (?cbc_glp_prob@@3PAUglp_prob@@A)<br>
> C:\Public\NZI\CBC\CBC\Cbc\MSVisualStudio\v10\cbc\libCbcSolver.lib(CbcS<br>
> olver.obj)<br>
> cbc<br>
><br>
> error LNK2001: unresolved external symbol "struct glp_prob * cbc_glp_prob"<br>
> (?cbc_glp_prob@@3PAUglp_prob@@A)<br>
> C:\Public\NZI\CBC\CBC\Cbc\MSVisualStudio\v10\cbcExamplesSample2\CbcSol<br>
> ver.obj<br>
> cbcExamplesSample2<br>
><br>
> error LNK2001: unresolved external symbol "struct glp_tran * cbc_glp_tran"<br>
> (?cbc_glp_tran@@3PAUglp_tran@@A)<br>
> C:\Public\NZI\CBC\CBC\Cbc\MSVisualStudio\v10\cbc\libCbcSolver.lib(CbcS<br>
> olver.obj)<br>
> cbc<br>
><br>
> error LNK2001: unresolved external symbol "struct glp_tran * cbc_glp_tran"<br>
> (?cbc_glp_tran@@3PAUglp_tran@@A)<br>
> C:\Public\NZI\CBC\CBC\Cbc\MSVisualStudio\v10\cbcExamplesSample2\CbcSol<br>
> ver.obj<br>
> cbcExamplesSample2<br>
><br>
><br>
><br>
> We are using the newest version of GLPK 4.7.7 and I have seen that<br>
> maybe there is a problem with the newer version of the GLPK API that<br>
> have not been implemented into CBC. Is there a specific version of<br>
> GLPK that I need, or is there some other step that I am missing? Is<br>
> there another lib or dll that I also need to be adding to the solution?<br>
><br>
><br>
><br>
> Thanks.<br>
><br>
><br>
><br>
> Tim Garton<br>
><br>
> ERDC - ITL<br>
><br>
> Computer Scientist<br>
><br>
> <a href="mailto:Timothy.W.Garton@erdc.dren.mil">Timothy.W.Garton@erdc.dren.mil</a><br>
><br>
> Ph: <a href="tel:%28601%29634-3111x5364" value="+16016343111">(601)634-3111x5364</a><br>
><br>
><br>
<br>
<br>
<br>
--<br>
Dr. Ted Ralphs<br>
Associate Professor, Lehigh University<br>
<a href="tel:%28610%29%20628-1280" value="+16106281280">(610) 628-1280</a><br>
ted 'at' lehigh 'dot' edu<br>
<a href="http://coral.ie.lehigh.edu/%7Eted" target="_blank">coral.ie.lehigh.edu/~ted</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Dr. Ted Ralphs<br>Associate Professor, Lehigh University<br>(610) 628-1280<br>ted 'at' lehigh 'dot' edu<br><a href="http://coral.ie.lehigh.edu/%7Eted" target="_blank">coral.ie.lehigh.edu/~ted</a><br>
<br>