[Coin-discuss] strncasecomp

Laszlo Ladanyi ladanyi at us.ibm.com
Thu Mar 30 20:35:06 EST 2006


I got rid of strncasecmp from CoinLpIO.cpp (essentially wrote a replacement
using tolower(), which is part of ANSI C). Could someone try it on windows?

--Laci

On Thu, 30 Mar 2006, Tobias Achterberg wrote:

> Hi Gabrielle,
> 
> strncasecmp is not ANSI or POSIX, and most probably your compiler
> doesn't support that. The same is true for snprintf, vsnprintf and
> strcasecmp. Michael Perregard of Dash Optimization came up with the
> following fix to compile SCIP, which might also help you guys. It
> replaces the methods by internally available equivalen methods. I
> think, in this case the Intel compiler was used, but I'm not sure. The
> code lines should be added to a header file that is included in each
> source file (in SCIP, this header file is called "def.h").
> 
> #if defined(_WIN32) || defined(_WIN64)
> #define snprintf _snprintf
> #define vsnprintf _vsnprintf
> #define strcasecmp _stricmp
> #define strncasecmp _strnicmp
> #endif
> 
> 
> Best regards,  Tobias
> 
> 
> Gabrielle A. Grün wrote:
> > 
> > 
> > Hi All,
> > 
> > I use Microsoft Visual   Studio .NET 2003, and since Monday,? I also see
> > the strncasecomp errors. Thanks.
> > 
> > 
> > 
> > ------ Build started: Project: osiCbcLib, Configuration: Debug Win32 ------
> > 
> > osiCbcLib - up-to-date.
> > 
> > 
> > ------ Build started: Project: osiClpLib, Configuration: Debug Win32 ------
> > 
> > osiClpLib - up-to-date.
> > 
> > 
> > ------ Build started: Project: osiLib, Configuration: Debug Win32 ------
> > 
> > osiLib - up-to-date.
> > 
> > 
> > ------ Build started: Project: cbcLib, Configuration: Debug Win32 ------
> > 
> > cbcLib - up-to-date.
> > 
> > 
> > ------ Build started: Project: clpLib, Configuration: Debug Win32 ------
> > 
> > clpLib - up-to-date.
> > 
> > 
> > ------ Build started: Project: cglLib, Configuration: Debug Win32 ------
> > 
> > cglLib - up-to-date.
> > 
> > 
> > ------ Build started: Project: coinLib, Configuration: Debug Win32 ------
> > 
> > Compiling...
> > CoinLpIO.cpp
> > e:\b4\NEWCOIN\c\COIN\Coin\include\CoinPackedVectorBase.hpp(66) : warning
> > C4290: C++ exception specification ignored except to indicate a function
> > is not __declspec(nothrow)
> > e:\b4\NEWCOIN\c\COIN\Coin\include\CoinPackedVectorBase.hpp(74) : warning
> > C4290: C++ exception specification ignored except to indicate a function
> > is not __declspec(nothrow)
> > e:\b4\NEWCOIN\c\COIN\Coin\include\CoinPackedVectorBase.hpp(87) : warning
> > C4290: C++ exception specification ignored except to indicate a function
> > is not __declspec(nothrow)
> > e:\b4\NEWCOIN\c\COIN\Coin\include\CoinPackedVectorBase.hpp(116) :
> > warning C4290: C++ exception specification ignored except to indicate a
> > function is not __declspec(nothrow)
> > e:\b4\NEWCOIN\c\COIN\Coin\include\CoinPackedVectorBase.hpp(217) :
> > warning C4290: C++ exception specification ignored except to indicate a
> > function is not __declspec(nothrow)
> > e:\b4\NEWCOIN\c\COIN\Coin\include\CoinShallowPackedVector.hpp(98) :
> > warning C4290: C++ exception specification ignored except to indicate a
> > function is not __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(116) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(123) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(129) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(136) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(166) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(169) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(171) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(177) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(184) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(192) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(205) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(212) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(220) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(234) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(240) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(289) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(295) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(424) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(428) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(433) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(436) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(440) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(445) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(463) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(469) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(476) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(483) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(492) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > ..\..\Coin\include\CoinPackedMatrix.hpp(496) : warning C4290: C++
> > exception specification ignored except to indicate a function is not
> > __declspec(nothrow)
> > \b4\NEWCOIN\c\COIN\Coin\CoinLpIO.cpp(944) : error C3861: 'strncasecmp':
> > identifier not found, even with argument-dependent lookup
> > \b4\NEWCOIN\c\COIN\Coin\CoinLpIO.cpp(945) : error C3861: 'strncasecmp':
> > identifier not found, even with argument-dependent lookup
> > \b4\NEWCOIN\c\COIN\Coin\CoinLpIO.cpp(946) : error C3861: 'strncasecmp':
> > identifier not found, even with argument-dependent lookup
> > \b4\NEWCOIN\c\COIN\Coin\CoinLpIO.cpp(947) : error C3861: 'strncasecmp':
> > identifier not found, even with argument-dependent lookup
> > \b4\NEWCOIN\c\COIN\Coin\CoinLpIO.cpp(947) : fatal error C1903: unable to
> > recover from previous error(s); stopping compilation
> > 
> > Build log was saved at "file://e:\b4\Newcoin\c\Coin\Copy (2) of
> > Win-VSNET\coinLib\Debug\BuildLog.htm"
> > coinLib - 5 error(s), 35 warning(s)
> > 
> > 
> > ------ Build started: Project: cbcSamplesSamples2b, Configuration: Debug
> > Win32 ------
> > 
> > Linking...
> > LINK : fatal error LNK1181: cannot open input file
> > '\b4\Newcoin\c\Coin\Copy (2) of Win-VSNET\coinLib\Debug\coinLib.lib'
> > 
> > Build log was saved at "file://e:\b4\Newcoin\c\Coin\Copy (2) of
> > Win-VSNET\cbcSamplesSamples2b\Debug\BuildLog.htm"
> > cbcSamplesSamples2b - 1 error(s), 0 warning(s)
> > 
> > 
> > ---------------------- Done ----------------------
> > 
> >    Build: 6 succeeded, 2 failed, 0 skipped
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > Gabrielle A. Grün, Ph.D. Student
> > School of Computing Science
> > Simon Fraser University
> > 8888 University Drive
> > Burnaby, BC
> > V5A 1S6
> > <http://www.cs.sfu.ca/~grun>
> > _______________________________________________
> > Coin-discuss mailing list
> > Coin-discuss at list.coin-or.org
> > http://list.coin-or.org/mailman/listinfo/coin-discuss
> 
> -- 
> Tobias Achterberg          Konrad-Zuse-Zentrum fuer
>                            Informationstechnik Berlin
> Tel: +49 (0)30 84185-301   Takustr. 7
> Email: achterberg at zib.de   D-14195 Berlin, Germany
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
> 





More information about the Coin-discuss mailing list