[Coin-discuss] Re: NDEBUG & COIN_ASSERT (Edgardo Fuchs)
John J Forrest
jjforre at us.ibm.com
Sat Jul 23 21:04:05 EDT 2005
Edgardo,
I have setup cygwin on my machine and tested. It now compiles for me.
What still breaks?
John Forrest
Edgardo Fuchs <edgardo_fuchs at mi.cl>
Sent by: coin-discuss-bounces at list.coin-or.org
07/21/2005 12:16 AM
Please respond to
edgardo_fuchs and Discussions about open source software for Operations
Research
To
coin-discuss at list.coin-or.org
cc
Subject
[Coin-discuss] Re: NDEBUG & COIN_ASSERT (Edgardo Fuchs)
John,
I compiled July 20th version of Coin, Clp, Osi and OsiClp, with gcc
under Cygwin and Visual C++ Toolkit 2003.
Under Cygwin, Coin and Osi compile cleanly. Clp and OsiClp result in
error messages of undeclared functions.
Without COIN_ASSERT option, all of them compile cleanly.
The results are the same with VC++ Toolkit.
I have included a text file with the compilers messages.
Regards,
Edgardo Fuchs
coin-discuss-request at list.coin-or.org wrote:
>Send Coin-discuss mailing list submissions to
> coin-discuss at list.coin-or.org
>
>To subscribe or unsubscribe via the World Wide Web, visit
> http://list.coin-or.org/mailman/listinfo/coin-discuss
>or, via email, send a message with subject or body 'help' to
> coin-discuss-request at list.coin-or.org
>
>You can reach the person managing the list at
> coin-discuss-owner at list.coin-or.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of Coin-discuss digest..."
>
>
>Today's Topics:
>
> 1. Re: NDEBUG & COIN_ASSERT (John J Forrest)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Thu, 14 Jul 2005 14:29:59 -0400
>From: John J Forrest <jjforre at us.ibm.com>
>Subject: Re: [Coin-discuss] NDEBUG & COIN_ASSERT
>To: <coin-discuss at list.coin-or.org>
>Message-ID:
> <OFAC4C7CD6.6157BC19-ON8525703E.00655341-8525703E.00659F8D at us.ibm.com>
>Content-Type: text/plain; charset="us-ascii"
>
>Edgardo,
>
>I have moved an #endif in CoinError.hpp - does that help? (No errors on
>my gcc but I can see that VC might get confused if it saw
>
> #if (__GNUC_PREREQ (2,6))
>
>I have tidied code to get rid of some unused variable warnings with
>-NDEBUG
>
>Uninitialized warnings seem to be compiler mistake.
>
>John Forrest
>
>
>
>Edgardo Fuchs <edgardo_fuchs at mi.cl>
>Sent by: coin-discuss-bounces at list.coin-or.org
>07/12/2005 10:42 PM
>Please respond to
>edgardo_fuchs and Discussions about open source software for Operations
>Research
>
>
>To
>COIN <coin-discuss at list.coin-or.org>
>cc
>
>Subject
>[Coin-discuss] NDEBUG & COIN_ASSERT
>
>
>
>
>
>
>Dear COIN list,
>
>I compiled Coin, Clp, Osi and OsiClp, with both gcc and VC Toolkit.
>
>Both of them produce errors with NDEBUG & COIN_ASSERT options.
>gcc produces a warning message with only NDEBUG option.
>VC Toolkit compiles without messages using only NDEBUG option.
>
>I included a text file with the compilation messages.
>
>Regards,
>Edgardo Fuchs
>
>
>
--
Edgardo Fuchs
Santiago, Chile
Tel: +56 (2) 435 0090
Cel: +56 9837 8433
gcc 3.4.4-1
Eclipse IDE
Win XP home
Compiler options:
-DNDEBUG -DCOIN_ASSERT -Wall -Wpointer-arith -Wcast-qual -Wwrite-strings
-Wconversion -pipe -O3
Coin:
====
No messages
Clp:
===
Building file: ../ClpModel.cpp
g++ -DNDEBUG -DCOIN_ASSERT -IC:\cpp\eclipse\Clp\include
-IC:\cpp\eclipse\Coin\include -O3 -Wall -c -Wpointer-arith -Wcast-qual
-Wwrite-strings -Wconversion -pipe -oClpModel.o ../ClpModel.cpp
../ClpModel.cpp: In member function `void ClpModel::setRowBounds(int,
double, double)':
../ClpModel.cpp:444: error: `CoinAssert' undeclared (first use this
function)
../ClpModel.cpp:444: error: (Each undeclared identifier is reported only
once for each function it appears in.)
../ClpModel.cpp: In member function `void ClpModel::setRowSetBounds(const
int*, const int*, const double*)':
../ClpModel.cpp:472: error: `CoinAssert' undeclared (first use this
function)
../ClpModel.cpp: In member function `void ClpModel::setColumnBounds(int,
double, double)':
../ClpModel.cpp:527: error: `CoinAssert' undeclared (first use this
function)
../ClpModel.cpp: In member function `void
ClpModel::setColumnSetBounds(const int*, const int*, const double*)':
../ClpModel.cpp:549: error: `CoinAssert' undeclared (first use this
function)
../ClpModel.cpp: In member function `int ClpModel::addRows(const
CoinBuild&, bool, bool)':
../ClpModel.cpp:1311: error: `CoinAssertHint' undeclared (first use this
function)
../ClpModel.cpp: In member function `int ClpModel::addColumns(const
CoinBuild&, bool, bool)':
../ClpModel.cpp:1764: error: `CoinAssertHint' undeclared (first use this
function)
../ClpModel.cpp: In member function `void
ClpModel::loadQuadraticObjective(int, const CoinBigIndex*, const int*,
const double*)':
../ClpModel.cpp:2498: error: `CoinAssert' undeclared (first use this
function)
../ClpModel.cpp: In member function `void
ClpModel::loadQuadraticObjective(const CoinPackedMatrix&)':
../ClpModel.cpp:2512: error: `CoinAssert' undeclared (first use this
function)
../ClpModel.cpp: In constructor `ClpModel::ClpModel(const ClpModel*, int,
const int*, int, const int*, bool, bool)':
../ClpModel.cpp:2625: error: `CoinAssertHint' undeclared (first use this
function)
make: *** [ClpModel.o] Error 1
Building file: ../ClpNonLinearCost.cpp
g++ -DNDEBUG -DCOIN_ASSERT -IC:\cpp\eclipse\Clp\include
-IC:\cpp\eclipse\Coin\include -O3 -Wall -c -Wpointer-arith -Wcast-qual
-Wwrite-strings -Wconversion -pipe -oClpNonLinearCost.o
../ClpNonLinearCost.cpp
../ClpNonLinearCost.cpp: In constructor
`ClpNonLinearCost::ClpNonLinearCost(ClpSimplex*, int)':
../ClpNonLinearCost.cpp:195: error: `CoinAssert' undeclared (first use
this function)
../ClpNonLinearCost.cpp:195: error: (Each undeclared identifier is
reported only once for each function it appears in.)
make: *** [ClpNonLinearCost.o] Error 1
Building file: ../ClpPlusMinusOneMatrix.cpp
g++ -DNDEBUG -DCOIN_ASSERT -IC:\cpp\eclipse\Clp\include
-IC:\cpp\eclipse\Coin\include -O3 -Wall -c -Wpointer-arith -Wcast-qual
-Wwrite-strings -Wconversion -pipe -oClpPlusMinusOneMatrix.o
../ClpPlusMinusOneMatrix.cpp
../ClpPlusMinusOneMatrix.cpp: In member function `void
ClpPlusMinusOneMatrix::checkValid(bool) const':
../ClpPlusMinusOneMatrix.cpp:1272: error: `CoinAssertHint' undeclared
(first use this function)
../ClpPlusMinusOneMatrix.cpp:1272: error: (Each undeclared identifier is
reported only once for each function it appears in.)
../ClpPlusMinusOneMatrix.cpp:1277: error: `CoinAssert' undeclared (first
use this function)
make: *** [ClpPlusMinusOneMatrix.o] Error 1
Building file: ../ClpSimplex.cpp
g++ -DNDEBUG -DCOIN_ASSERT -IC:\cpp\eclipse\Clp\include
-IC:\cpp\eclipse\Coin\include -O3 -Wall -c -Wpointer-arith -Wcast-qual
-Wwrite-strings -Wconversion -pipe -oClpSimplex.o ../ClpSimplex.cpp
In file included from
C:/cpp/eclipse/Coin/include/CoinHelperFunctions.hpp:13,
from ../ClpSimplex.cpp:11:
C:/cpp/eclipse/Coin/include/CoinError.hpp:155:27: missing binary operator
before token "("
C:/cpp/eclipse/Coin/include/CoinError.hpp:201:24: missing binary operator
before token "("
../ClpSimplex.cpp: In member function `bool ClpSimplex::createRim(int,
bool, int)':
../ClpSimplex.cpp:2751: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp:2751: error: (Each undeclared identifier is reported
only once for each function it appears in.)
../ClpSimplex.cpp: In member function `int ClpSimplex::dual(int, int)':
../ClpSimplex.cpp:4286: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp: In member function `int ClpSimplex::primal(int, int)':
../ClpSimplex.cpp:4386: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp: In member function `int ClpSimplex::saveModel(const
char*)':
../ClpSimplex.cpp:5024: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp: In member function `void
ClpSimplex::setValuesPassAction(float, float)':
../ClpSimplex.cpp:6732: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp: In constructor `ClpSimplex::ClpSimplex(ClpSimplex*,
int, const int*)':
../ClpSimplex.cpp:7188: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp: In member function `void ClpSimplex::getBasics(int*)':
../ClpSimplex.cpp:7737: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp: In member function `void ClpSimplex::setRowBounds(int,
double, double)':
../ClpSimplex.cpp:7840: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp: In member function `void
ClpSimplex::setRowSetBounds(const int*, const int*, const double*)':
../ClpSimplex.cpp:7896: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp: In member function `void
ClpSimplex::setColumnBounds(int, double, double)':
../ClpSimplex.cpp:8027: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp: In member function `void
ClpSimplex::setColumnSetBounds(const int*, const int*, const double*)':
../ClpSimplex.cpp:8067: error: `__STRING' undeclared (first use this
function)
make: *** [ClpSimplex.o] Error 1
Building file: ../ClpSimplex.cpp
g++ -DNDEBUG -DCOIN_ASSERT -IC:\cpp\eclipse\Clp\include
-IC:\cpp\eclipse\Coin\include -O3 -Wall -c -Wpointer-arith -Wcast-qual
-Wwrite-strings -Wconversion -pipe -oClpSimplex.o ../ClpSimplex.cpp
In file included from
C:/cpp/eclipse/Coin/include/CoinHelperFunctions.hpp:13,
from ../ClpSimplex.cpp:11:
C:/cpp/eclipse/Coin/include/CoinError.hpp:155:27: missing binary operator
before token "("
C:/cpp/eclipse/Coin/include/CoinError.hpp:201:24: missing binary operator
before token "("
../ClpSimplex.cpp: In member function `bool ClpSimplex::createRim(int,
bool, int)':
../ClpSimplex.cpp:2751: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp:2751: error: (Each undeclared identifier is reported
only once for each function it appears in.)
../ClpSimplex.cpp: In member function `int ClpSimplex::dual(int, int)':
../ClpSimplex.cpp:4286: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp: In member function `int ClpSimplex::primal(int, int)':
../ClpSimplex.cpp:4386: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp: In member function `int ClpSimplex::saveModel(const
char*)':
../ClpSimplex.cpp:5024: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp: In member function `void
ClpSimplex::setValuesPassAction(float, float)':
../ClpSimplex.cpp:6732: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp: In constructor `ClpSimplex::ClpSimplex(ClpSimplex*,
int, const int*)':
../ClpSimplex.cpp:7188: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp: In member function `void ClpSimplex::getBasics(int*)':
../ClpSimplex.cpp:7737: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp: In member function `void ClpSimplex::setRowBounds(int,
double, double)':
../ClpSimplex.cpp:7840: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp: In member function `void
ClpSimplex::setRowSetBounds(const int*, const int*, const double*)':
../ClpSimplex.cpp:7896: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp: In member function `void
ClpSimplex::setColumnBounds(int, double, double)':
../ClpSimplex.cpp:8027: error: `__STRING' undeclared (first use this
function)
../ClpSimplex.cpp: In member function `void
ClpSimplex::setColumnSetBounds(const int*, const int*, const double*)':
../ClpSimplex.cpp:8067: error: `__STRING' undeclared (first use this
function)
make: *** [ClpSimplex.o] Error 1
Building file: ../ClpSimplexDual.cpp
g++ -DNDEBUG -DCOIN_ASSERT -IC:\cpp\eclipse\Clp\include
-IC:\cpp\eclipse\Coin\include -O3 -Wall -c -Wpointer-arith -Wcast-qual
-Wwrite-strings -Wconversion -pipe -oClpSimplexDual.o
../ClpSimplexDual.cpp
../ClpSimplexDual.cpp: In member function `int
ClpSimplexDual::whileIterating(double*&, int)':
../ClpSimplexDual.cpp:1009: error: `CoinAssert' undeclared (first use this
function)
../ClpSimplexDual.cpp:1009: error: (Each undeclared identifier is reported
only once for each function it appears in.)
../ClpSimplexDual.cpp: In member function `int
ClpSimplexDual::changeBounds(bool, CoinIndexedVector*, double&)':
../ClpSimplexDual.cpp:2351: error: `CoinAssert' undeclared (first use this
function)
../ClpSimplexDual.cpp: In member function `int
ClpSimplexDual::strongBranching(int, const int*, double*, double*,
double**, int*, int*, bool, bool, int)':
../ClpSimplexDual.cpp:4525: error: `CoinAssert' undeclared (first use this
function)
make: *** [ClpSimplexDual.o] Error 1
Building file: ../ClpSimplexOther.cpp
g++ -DNDEBUG -DCOIN_ASSERT -IC:\cpp\eclipse\Clp\include
-IC:\cpp\eclipse\Coin\include -O3 -Wall -c -Wpointer-arith -Wcast-qual
-Wwrite-strings -Wconversion -pipe -oClpSimplexOther.o
../ClpSimplexOther.cpp
../ClpSimplexOther.cpp: In member function `int
ClpSimplexOther::whileIterating(double, double&, double, const double*,
const double*, const double*)':
../ClpSimplexOther.cpp:2200: error: `CoinAssert' undeclared (first use
this function)
../ClpSimplexOther.cpp:2200: error: (Each undeclared identifier is
reported only once for each function it appears in.)
make: *** [ClpSimplexOther.o] Error 1
Building file: ../ClpSimplexPrimal.cpp
g++ -DNDEBUG -DCOIN_ASSERT -IC:\cpp\eclipse\Clp\include
-IC:\cpp\eclipse\Coin\include -O3 -Wall -c -Wpointer-arith -Wcast-qual
-Wwrite-strings -Wconversion -pipe -oClpSimplexPrimal.o
../ClpSimplexPrimal.cpp
../ClpSimplexPrimal.cpp: In member function `int
ClpSimplexPrimal::pivotResult(int)':
../ClpSimplexPrimal.cpp:2344: error: `CoinAssert' undeclared (first use
this function)
../ClpSimplexPrimal.cpp:2344: error: (Each undeclared identifier is
reported only once for each function it appears in.)
make: *** [ClpSimplexPrimal.o] Error 1
Osi:
===
No messages
OsiClp:
======
Building file: ../OsiClpSolverInterface.cpp
g++ -DNDEBUG -DCOIN_ASSERT -IC:\cpp\eclipse\OsiClp\include
-IC:\cpp\eclipse\Osi\include -IC:\cpp\eclipse\Clp\include
-IC:\cpp\eclipse\Coin\include -O3 -Wall -c -Wpointer-arith -Wcast-qual
-Wwrite-strings -Wconversion -pipe -oOsiClpSolverInterface.o
../OsiClpSolverInterface.cpp
../OsiClpSolverInterface.cpp: In member function `virtual void
OsiClpSolverInterface::solveFromHotStart()':
../OsiClpSolverInterface.cpp:1008: error: `CoinAssert' undeclared (first
use this function)
../OsiClpSolverInterface.cpp:1008: error: (Each undeclared identifier is
reported only once for each function it appears in.)
{standard input}: Assembler messages:
{standard input}:481: Error: Local symbol `LTHUNK0' can't be equated to
undefined symbol `__ZN21OsiClpSolverInterface22enableSimplexInterfaceEb'
{standard input}:481: Error: Local symbol `LTHUNK1' can't be equated to
undefined symbol `__ZN21OsiClpSolverInterface23disableSimplexInterfaceEv'
{standard input}:481: Error: Local symbol `LTHUNK2' can't be equated to
undefined symbol `__ZN21OsiClpSolverInterface14getBasisStatusEPiS0_'
{standard input}:481: Error: Local symbol `LTHUNK3' can't be equated to
undefined symbol `__ZN21OsiClpSolverInterface14setBasisStatusEPKiS1_'
{standard input}:481: Error: Local symbol `LTHUNK4' can't be equated to
undefined symbol `__ZN21OsiClpSolverInterface5pivotEiii'
{standard input}:481: Error: Local symbol `LTHUNK5' can't be equated to
undefined symbol
`__ZN21OsiClpSolverInterface17primalPivotResultEiiRiS0_RdP16CoinPackedVector'
{standard input}:481: Error: Local symbol `LTHUNK6' can't be equated to
undefined symbol
`__ZN21OsiClpSolverInterface15dualPivotResultERiS0_iiRdP16CoinPackedVector'
{standard input}:481: Error: Local symbol `LTHUNK7' can't be equated to
undefined symbol
`__ZN21OsiClpSolverInterface18getReducedGradientEPdS0_PKd'
{standard input}:481: Error: Local symbol `LTHUNK8' can't be equated to
undefined symbol `__ZN21OsiClpSolverInterface22setObjectiveAndRefreshEPd'
{standard input}:481: Error: Local symbol `LTHUNK9' can't be equated to
undefined symbol `__ZN21OsiClpSolverInterface11getBInvARowEiPdS0_'
{standard input}:481: Error: Local symbol `LTHUNK10' can't be equated to
undefined symbol `__ZN21OsiClpSolverInterface10getBInvRowEiPd'
{standard input}:481: Error: Local symbol `LTHUNK11' can't be equated to
undefined symbol `__ZN21OsiClpSolverInterface11getBInvAColEiPd'
{standard input}:481: Error: Local symbol `LTHUNK12' can't be equated to
undefined symbol `__ZN21OsiClpSolverInterface10getBInvColEiPd'
{standard input}:481: Error: Local symbol `LTHUNK13' can't be equated to
undefined symbol `__ZN21OsiClpSolverInterface9getBasicsEPi'
{standard input}:481: Error: Local symbol `LTHUNK14' can't be equated to
undefined symbol `__ZN21OsiClpSolverInterfaceD0Ev'
{standard input}:481: Error: Local symbol `LTHUNK15' can't be equated to
undefined symbol `__ZN21OsiClpSolverInterfaceD1Ev'
make: *** [OsiClpSolverInterface.o] Error 1
Clp without COIN_ASSERT option:
==============================
Some uninitialization warnings only
OsiClp without COIN_ASSERT option:
=================================
No messages
//
============================================================================
Visual C++ Toolkit 2003
Code::Blocks IDE
Win Xp home
Compiler options:
/nologo /W1 /GR /GX /O2 /YX /FD /c /D WIN32 /D NDEBUG /D COIN_ASSERT /D
_MBCS /D _LIB
Coin:
====
No messages
Clp:
===
ClpModel.cpp(444) : error C3861: 'CoinAssert': identifier not found, even
with argument-dependent lookup
ClpModel.cpp(472) : error C3861: 'CoinAssert': identifier not found, even
with argument-dependent lookup
ClpModel.cpp(527) : error C3861: 'CoinAssert': identifier not found, even
with argument-dependent lookup
ClpModel.cpp(549) : error C3861: 'CoinAssert': identifier not found, even
with argument-dependent lookup
ClpModel.cpp(1311) : error C3861: 'CoinAssertHint': identifier not found,
even with argument-dependent lookup
ClpModel.cpp(1422) : error C3861: 'CoinAssertHint': identifier not found,
even with argument-dependent lookup
ClpModel.cpp(1764) : error C3861: 'CoinAssertHint': identifier not found,
even with argument-dependent lookup
ClpModel.cpp(2498) : error C3861: 'CoinAssert': identifier not found, even
with argument-dependent lookup
ClpModel.cpp(2512) : error C3861: 'CoinAssert': identifier not found, even
with argument-dependent lookup
ClpModel.cpp(2625) : error C3861: 'CoinAssertHint': identifier not found,
even with argument-dependent lookup
ClpModel.cpp(2630) : error C3861: 'CoinAssertHint': identifier not found,
even with argument-dependent lookup
Osi:
===
No messages
OsiClp:
======
OsiClpSolverInterface.cpp
OsiClpSolverInterface.cpp(1008) : error C3861: 'CoinAssert': identifier
not found, even with argument-dependent lookup
Process terminated with status 1 (0 minutes, 9 seconds)
Clp without COIN_ASSERT option:
==============================
No messages
OsiClp without COIN_ASSERT option:
=================================
No messages
_______________________________________________
Coin-discuss mailing list
Coin-discuss at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20050723/1e5273c4/attachment.html>
More information about the Coin-discuss
mailing list