This topic is now archived and is closed to further replies.

how to detect when compiling on win32

This topic is 5023 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is something I thought I did correctly I have a function that requires different to be compile depends on whether you are in windows or in linux, so: #ifdef WIN32 #include <windows.h> windows code #else linux code #endif this is used to work, I took the code into a different program and try to compile it with dev-cpp, it seems not longer able to differentiate when it is in windows thus causing compiler error. What is the standard way for detecting if you compiling on windows ?

Share this post

Link to post
Share on other sites