C++ macros for OS

Discussion in 'OT Technology' started by BaZ, Jun 4, 2003.

  1. BaZ

    BaZ 2004 ACC Champions

    Joined:
    Jun 12, 2001
    Messages:
    2,005
    Likes Received:
    0
    Location:
    Hokieville, USA
    I know they probably exist, so what are they? I am writing a cross-platform app and I need to be able to tell which OS the code was compiled on.
     
  2. skinjob

    skinjob Active Member

    Joined:
    Jan 6, 2001
    Messages:
    2,337
    Likes Received:
    0
    Location:
    Aztlán
    I don't think there are any standard macros for that. Just make your own.
     
  3. BaZ

    BaZ 2004 ACC Champions

    Joined:
    Jun 12, 2001
    Messages:
    2,005
    Likes Received:
    0
    Location:
    Hokieville, USA
    ok, i looked around for a while online (my boss will get on my ass for internet usage i'm sure) and found this, in case anybody else was curious.

    http://predef.sourceforge.net/preos.html

    so far, i know they work in dev-c++ for windows but i haven't tried them on VC++/.NET or g++
     
  4. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    Works for me with g++.
     

Share This Page