View Single Post
Join Date: Oct 2007
Posts: 305
Reputation: stilllearning has a spectacular aura about stilllearning has a spectacular aura about 
Solved Threads: 43
stilllearning stilllearning is offline Offline
Posting Whiz

Re: how to identify which OS I am using

 
0
  #18
Oct 2nd, 2008
for example on Linux you could compile using

g++ -D_LINUX file.cpp -o output # turns on the #define _LINUX

and on windows using

g++ -D_WIN32 file.cpp -o output #turns on #define _WIN32

So if you had a makefile on both systems, you could set your compiler flags to reflect the defines you need.
Last edited by stilllearning; Oct 2nd, 2008 at 8:26 pm.
Reply With Quote