[Coin-discuss] MSV pragma
Andreas Waechter
andreasw at watson.ibm.com
Sun Apr 1 11:11:22 EDT 2007
Hi Matt,
I don't think it is necessarily a good idea to have all projects
necessarily draw in CoinPragma.hpp (e.g., Ipopt currently doesn't use
CoinUtils).
Maybe JP can just add those flags to the compilation flags in the
DeveloperStudio projects... JP, what do you think?
Cheers
Andreas
On Sun, 1 Apr 2007, Matthew Galati wrote:
> 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
> _______________________________________________
> 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