Re: MSWINDOWS ??

Bob Friesenhahn <[email protected]> Thu, 5 Mar 2020 08:10:08 -0600 (CST)
Newsgroups gmane.comp.video.graphicsmagick.apis
Message-ID <[email protected]>
On Wed, 4 Mar 2020, 10bxjfhf wrote:

> In going through some of the code, I find that within VisualMagick project, 
> the macro MSWINDOWS was defined.
>
> Is there a need to have the same macro defined in my app when using Magick++?
>
> From what I see in some of the GM Magick code when I trace through the 
> InitializeMagick code in magick.c it is not defined at the top of magick.c in
>
> #if defined(MSWINDOWS) || defined(__CYGWIN__)
> # include "magick/nt_feature.h"   <<<<<< not included
> #endif
>
> As everything seems to be working, as far as I can tell, trying to figure 
> this out just curiosity on my part and part of my 'magick' education ;-)

This is what appears in both magick/studio.h and magick/api.h:

/*
   Note that the WIN32 and WIN64 definitions are provided by the build
   configuration rather than the compiler.  Definitions available from
   the Windows compiler are _WIN32 and _WIN64.
*/
#if defined(WIN32) || defined(WIN64)
#  define MSWINDOWS
#endif /* defined(WIN32) || defined(WIN64) */

I am not totally sure why things were done this way since the original 
Visual Studio Windows build configuration was produced by someone 
other than me (Bill Radcliffe).

Note that we also support Windows builds using a MinGW compiler 
(native WIN32/WIN64) as well as for Cygwin (POSIX APIs but with some 
WIN32/WIN64 APIs added).

Bob
-- 
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt