[gmx-developers] *WIN* defines

Erik Lindahl lindahl at stanford.edu
Wed Oct 2 00:20:43 CEST 2002


Anton Feenstra wrote:
> Hi,
> 
> 
> In trjconv.c (and possibly in other places) I found the line:
> 
> #if (!defined WIN32 && !defined _WIN32 && !defined WIN64 && !defined _WIN64)
> 
> Which made me think it might be better to have an includefile do something
> like:
> 
> #if (!defined WIN32 && !defined _WIN32 && !defined WIN64 && !defined _WIN64)
> #define WIN
> #endif
> 
> so the code can simply check #ifdef WIN
> Possibly the same goes for other OS/platform conditionals.
> 
> Any thoughts on this?
> 

Yes, in principle it's a nice idea, but you have to be careful since 
there are many alternatives: Compiling with CygWin under windows, 
Compiling with MingW, compiling natively with MS Visual C, etc...

Cheers,

Erik






More information about the gromacs.org_gmx-developers mailing list