On Tue, Oct 15, 2013 at 7:23 AM, Ruben Van Boxem
<[email protected]>wrote:

> 2013/10/15 LRN <[email protected]>
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 15.10.2013 14:06, Incongruous wrote:
>> > I would like to test for MinGW64 to include or exclude some code;
>> something like:
>> > #ifdef MinGW64
>> > doThis();
>> > #endif
>> > #ifdef __MSV__
>> > doSomthingElse
>> > #endif
>> >
>> > is this possible?
>> >
>> #ifdef __MINGW64_VERSION_MAJOR
>> doThis ();
>> #endif
>> #ifdef _MSC_VER
>> doSomethingElse ();
>> #endif
>>
>
> If you need to test GCC, Clang or MSVC, use __GNUC__, __clang__, or
> _MSC_VER (this one is also defined on Intel and Clang under certain
> circumstances)
>
> If you need to test MinGW(-w64) vs MSVC, use __MINGW32__ vs _MSC_VER
>
> If you need to test MinGW-w64 vs MinGW.org, use __MINGW64_VERSION_MAJOR
> (this one requires you to include a MinGW-w64 header before it is defined).
>
> A nice collection of most of these is located here:
> http://sourceforge.net/p/predef/wiki/Home/
>
>
> Ruben
>

>From the FAQ Compilation section,s "How can I check for mingw-w64 headers?"


http://sourceforge.net/apps/trac/mingw-w64/wiki/Answer%20Check%20For%20Mingw-w64

Perhaps it needs refreshed to add Ruben's backgrounder tidbits.
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to