[Coin-discuss] MSV pragma

Matthew Galati magh at lehigh.edu
Sun Apr 1 10:03:01 EDT 2007


I am compiling through Microsoft Visual Studio (2005) - so I am not 
using anything from autotools or make.

There is probably somewhere I can disable warnings in my VS project 
workspace. And, I can do that for my own project - but I depend on 
several workspaces from other COIN projects which get pulled down via 
externals - and I can't really edit their project configurations.

So, when you compile my project, and it compiles other COIN projects, I 
get loads of warnings.

Matt



> Hi Matt,
>
> What happens when you add the flag -wd4996 and -wd4290 to your 
> compiler flags?
>
> Andreas
>
> On Sun, 1 Apr 2007, Matthew Galati wrote:
>
>> When built in MSV, several COIN projects trigger warnings 
>> C4290/C4996. I am fine ignoring them, but can we get them disabled? 
>> In my project, I do it in my DecompConfig.h. But, my project depends 
>> on several other COIN projects - so I get a very messy build log when 
>> building the deps.
>>
>> Can we somehow add these across the board? Maybe putting them in 
>> CoinPragma.hpp? Although I am not sure all projects include 
>> CoinPragma.hpp.
>>
>> Thanks,
>> Matt
>>
>>
>> /***************************************************************************/ 
>>
>> /*             HERE DEFINE MS PRAGMAS TO DISABLE SOME 
>> WARNINGS             */
>> /***************************************************************************/ 
>>
>> #include "CoinPragma.hpp"
>> #if defined(_MSC_VER)
>> // warning C4290: C++ exception specification ignored except to indicate
>> // a function is not __declspec(nothrow)
>> # pragma warning(disable:4290)
>> //warning C4996: 'std::xxx' was declared deprecated
>> # pragma warning(disable:4996)
>> #endif
>>
>>
>>
>> _______________________________________________
>> 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



More information about the Coin-discuss mailing list