[Coin-discuss] Problems compiling CoinLib under VC++ 6

Leo Lopes leo at sie.arizona.edu
Mon May 23 17:28:06 EDT 2005


My 2c: Unless an insurmountable amount of effort is required, we should 
be able to build under gcc on Linux and Mac and Visual C++ on Windows.

Laszlo Ladanyi wrote:

>Strange, I just checked out the code and the fix is there...
>
>Anyway, I was wrong about VC++6 having a bug. That the C++ standard has
>changed and in the previos standard the scope of a variable defined in a for
>statement (but not within its body) was the whole block enclosing the for
>statement, while in the current standard the scope of such variable is just
>the loop (which makes a lot more sense, IMHO). The change has occured sometime
>around the turn of the century :-), I googled for it a lot, but couldn't
>pinpoint it. So VC++6 was correct at the time. It does have bugs (so does gcc,
>what sufficiently complex program doesn't?), but this is not one of them.
>VC++7 (the .NET version) adheres to the current standard, Thanks goes to JP
>for pointing this out.
>
>In general it's a good question which standard one should conform to in a
>language. Use the latest and greatest *defined* features, which may be
>inefficiently or maybe downright incorrectly implemented in some or all
>compilers, or stick to an older standard, which may be clumsier. At what
>point a switch should be made? I'm not sure what's the right answer.
>
>--Laci
>
>On Sun, 22 May 2005, Paolo wrote:
>
>  
>
>>Laszlo Ladanyi wrote:
>>
>>    
>>
>>>Hi Paolo,
>>>
>>>This is a bug in MSVC++ 6. It considers it a syntax error if you use the same
>>>variable name to define variables in two independent basic block (something
>>>enclosed in {}). Anyway, I changed the code to work around it by moving the
>>>definition of iColumn to the beginning of the function. The change is
>>>committed.
>>>
>>>--Laci
>>>
>>>On Fri, 20 May 2005, Paolo wrote:
>>>
>>> 
>>>
>>>      
>>>
>>>>Hi guys,
>>>>I'm trying to compile COIN using OSL under win32 using VC++ 6
>>>>
>>>>Compiler gives me the following error:
>>>>
>>>>CoinFactorization2.cpp
>>>>i:\RicOp2\COIN\Coin\CoinFactorization2.cpp(530) : error C2374: 'iColumn' 
>>>>: redefinition; multiple initialization
>>>>       i:\RicOp2\COIN\Coin\CoinFactorization2.cpp(465) : see 
>>>>declaration of 'iColumn'
>>>>in project CoinLib
>>>>
>>>>Any idea to solve this problem?
>>>>
>>>>Thanks
>>>>
>>>>Paolo Chil?
>>>>_______________________________________________
>>>>Coin-discuss mailing list
>>>>Coin-discuss at list.coin-or.org
>>>>http://list.coin-or.org/mailman/listinfo/coin-discuss
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>_______________________________________________
>>>Coin-discuss mailing list
>>>Coin-discuss at list.coin-or.org
>>>http://list.coin-or.org/mailman/listinfo/coin-discuss
>>>
>>>
>>> 
>>>
>>>      
>>>
>>I updated sources with WinCVS but still no result... I think changes you 
>>have made has not been committed... I'll try moving the declaration 
>>myself but it would be nice to have the change in sources
>>
>>Paolo
>>
>>    
>>
>
>_______________________________________________
>Coin-discuss mailing list
>Coin-discuss at list.coin-or.org
>http://list.coin-or.org/mailman/listinfo/coin-discuss
>  
>

-- 
========================================================================
Leonardo B. Lopes                                    leo at sie.arizona.edu
Assistant Professor                                        (520)621-2342
SIE - University of Arizona  http://www.sie.arizona.edu/faculty/leolopes




More information about the Coin-discuss mailing list