[Cbc] Building with Visual Studio 2008

Ted Ralphs ted at lehigh.edu
Thu Jul 21 15:43:22 EDT 2011


OK, I just went through and re-updated everything. It *should* all be
fixed now. One of the problems is that we are now supporting 64-bit
configurations, so there are four total build types and Microsoft
makes it so very easy to make changes in one configuration and not in
others by accident. It sometimes does not even save all of your
changes when you make changes to multiple configurations unless you
hit the "Apply" button. This seems like an obvious bug. What a
headache! Can you get a fresh checkout of 2.7 and see if it all works
now out of the box? Then I will make a new release.

Cheers,

Ted

On Thu, Jul 21, 2011 at 12:21 PM, Ted Ralphs <ted at lehigh.edu> wrote:
> Hi Iain,
>
> Sorry about that! These are exactly the kinds of changes that I had to
> make in dozens of MSVC++ 2010 files to get them working again, but I
> must have missed some. Let me just try to make the changes and if it
> looks easier to get the patch from you, I'll let you know. Actually,
> if it's not too much trouble, you could try just sending the project
> and solution files you modified in e-mail off-line. I will then make a
> new release of Cbc with the new files.
>
> Cheers,
>
> Ted
>
> On Thu, Jul 21, 2011 at 3:47 AM, Iain Dunning <iaindunning at gmail.com> wrote:
>> Hi Ted,
>> I'll give that a go, hopefully that works.
>> I actually tried VS2010 first - but hit a different problem altogether. I'll
>> give it another go...
>> Downloading clean from the SVN, release/2.7.0, opening the /v10/ version,
>> then building cbcExamplesSample2:
>>
>> 3>------ Build started: Project: cbcExamplesSample2, Configuration: Debug
>> Win32 ------
>> 3>  CbcLinked.cpp
>> 3>c:\coin\cbc\cbc\src\CbcLinked.hpp(29): error C2504: 'CbcOsiSolver' : base
>> class undefined
>>
>> Which I fixed by adding CBC_BUILD to the preprocessor directives.
>> But then it seems to almost get to the end, before saying:
>>
>> 7>  Generating Code...
>> 7>LINK : fatal error LNK1181: cannot open input file 'libCoinUtils.lib'
>>
>> Which I fixed by making "MSVisualStudio\v10\Win32\Debug" an additional
>> library directory. It then runs fine.
>> Trying to build the cbc project:
>>
>> 4>------ Build started: Project: cbc, Configuration: Debug Win32 ------
>> 4>  CoinSolve.cpp
>> 4>LINK : fatal error LNK1181: cannot open input file 'libCgl.lib'
>>
>> Which I again fixed by adding that directory. It then builds.
>> I did some more digging around in the options, and I think the issue is
>> this:
>> Some projects output to $(SolutionDir)$(Platform)\$(Configuration)\
>> Other projects output to $(SolutionDir)$(Configuration)\
>> If I standardise to the $(Platform)\ version, it all works fine (for cbc,
>> still need to add CBC_BUILD to get cbcExamplesSample2 working).
>> Are you able to use TortoiseSVN-generated patches? Or do you just want to
>> fix it yourself?
>> Cheers,
>> Iain
>>
>> On 21 July 2011 16:41, Ted Ralphs <ted at lehigh.edu> wrote:
>>>
>>> Hi Iain,
>>>
>>> The 2008 project files are surely out of date---I just spent several
>>> days working out the bugs in the new 2010 files and those should work
>>> fine. If possible, I would suggest you just download MSVC++ Express
>>> 2010 and use that, as I'm not too keen on more wrestling with MSVC++
>>> anytime soon :). If you can't do that, I can tell you that most of the
>>> errors you are seeing will be corrected if you add
>>>
>>> XXX_BUILD
>>>
>>> to the list of preprocessor symbols defined, where "XXX" is the
>>> project acronym (in all caps). This is necessary under the new system
>>> we have adopted for configuration header files, which is used in the
>>> latest releases of COIN projects. Even for the projects that are not
>>> currently broken, you should add that symbol, as they may otherwise
>>> break in future releases. That should fix most things. If there are
>>> still errors, post another message. Also, if you want to contribute
>>> the repaired files, that would be great.
>>>
>>> Cheers,
>>>
>>> Ted
>>>
>>> On Wed, Jul 20, 2011 at 11:59 PM, Iain Dunning <iaindunning at gmail.com>
>>> wrote:
>>> > Hi,
>>> > I'm having a lot of trouble trying to build CBC with Visual Studio 2008.
>>> > This happens in 2.7 stable, 2.7.0 release, and trunk.
>>> > What I want to do is build "cbc.exe", but at the moment I'm just trying
>>> > to
>>> > build the default project, cbcExamplesSample2
>>> >
>>> > The errors I hit are many and varied...
>>> > I suspect some are pre-processor related, others seem more problematic.
>>> > 1. Project libOsi - all fine
>>> > 2. Project libClp
>>> > c:\coin\cbc\clp\src\clphelperfunctions.hpp(16) : fatal error C1189:
>>> > #error :
>>> >  "don't have header file for math"
>>> > Happens a few times.
>>> > 3. Project libCoinUtils
>>> > c:\coin\cbc\clp\src\clphelperfunctions.hpp(16) : fatal error C1189:
>>> > #error :
>>> >  "don't have header file for math"
>>> > 4. Project libOsiClp - all fine
>>> > 5. Project libCbcSolver
>>> > ..\..\..\src\unitTestClp.cpp(584) : error C2039: 'fastNodeDepth' : is
>>> > not a
>>> > member of 'CbcModel'
>>> >         c:\coin\cbc\cbc\src\CbcModel.hpp(99) : see declaration of
>>> > 'CbcModel'
>>> > ..\..\..\src\unitTestClp.cpp(585) : error C2039: 'setFastNodeDepth' : is
>>> > not
>>> > a member of 'CbcModel'
>>> >         c:\coin\cbc\cbc\src\CbcModel.hpp(99) : see declaration of
>>> > 'CbcModel'
>>> > c:\coin\cbc\cbc\src\CbcLinked.hpp(29) : error C2504: 'CbcOsiSolver' :
>>> > base
>>> > class undefined
>>> > Then a lot of errors follow on from this.
>>> > 7. Project libCgl
>>> > c:\coin\cbc\cbc\src\cbcheuristic.cpp(539) : error C2039:
>>> > 'continuousPriority' : is not a member of 'CbcModel
>>> > c:\coin\cbc\cbc\src\cbcheuristic.cpp(906) : error C2039:
>>> > 'setFastNodeDepth'
>>> > : is not a member of 'CbcModel'
>>> > c:\coin\cbc\cbc\src\cbcheuristic.cpp(1163) : error C2039:
>>> > 'setFastNodeDepth'
>>> > : is not a member of 'CbcModel'
>>> > c:\coin\cbc\cbc\src\cbcheuristic.cpp(1164) : error C2039:
>>> > 'fastNodeDepth' :
>>> > is not a member of 'CbcModel'
>>> > There seems to be issues in the "test" projects, but I don't need those.
>>> > Any idea about how I fix these issues?
>>> > Cheers,
>>> > Iain
>>> > _______________________________________________
>>> > Cbc mailing list
>>> > Cbc at list.coin-or.org
>>> > http://list.coin-or.org/mailman/listinfo/cbc
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Dr. Ted Ralphs
>>> Associate Professor, Lehigh University
>>> (610) 628-1280
>>> ted 'at' lehigh 'dot' edu
>>> coral.ie.lehigh.edu/~ted
>>
>>
>>
>> --
>> Iain Dunning
>> Email:    iaindunning at gmail.com
>> Web:      www.iaindunning.com
>> LinkedIn: nz.linkedin.com/in/iaindunning
>>
>
>
>
> --
> Dr. Ted Ralphs
> Associate Professor, Lehigh University
> (610) 628-1280
> ted 'at' lehigh 'dot' edu
> coral.ie.lehigh.edu/~ted
>



-- 
Dr. Ted Ralphs
Associate Professor, Lehigh University
(610) 628-1280
ted 'at' lehigh 'dot' edu
coral.ie.lehigh.edu/~ted




More information about the Cbc mailing list