운영 체제 의 매크로 를 구분 하 다.

  :http://blog.csdn.net/immcss/archive/2009/02/12/3881827.aspx

 

              ,              ,          

       
        GCC
        #ifdef  __GNUC__
            #if __GNUC__ >= 3 // GCC3.0  
        Visual C++
        #ifdef  _MSC_VER( VC           )
            #if _MSC_VER >=1000 // VC++4.0  
            #if _MSC_VER >=1100 // VC++5.0  
            #if _MSC_VER >=1200 // VC++6.0  
            #if _MSC_VER >=1300 // VC2003  
            #if _MSC_VER >=1400 // VC2005  
        Borland  C++
        #ifdef  __BORLANDC__
    UNIX
        UNIX
        #ifdef  __unix
        or
        #ifdef  __unix__
        Linux
        #ifdef  __linux
        or
        #ifdef  __linux__
        FreeBSD
        #ifdef  __FreeBSD__
        NetBSD
        #ifdef  __NetBSD__
    Windows
        32bit
        #ifdef  _WIN32(  WIN32)
        64bit
        #ifdef  _WIN64
        GUI  App
        #ifdef  _WINDOWS 
        CUI  App
        #ifdef  _CONSOLE
        Windows Ver … WINVER
        ※ PC Windows(95/98/Me/NT/2000/XP/Vista) Windows CE    
            #if (WINVER >= 0x030a) // Windows 3.1  
            #if (WINVER >= 0x0400) // Windows 95/NT 4.0  
            #if (WINVER >= 0x0410) // Windows 98  
            #if (WINVER >= 0x0500) // Windows Me/2000  
            #if (WINVER >= 0x0501) // Windows XP  
            #if (WINVER >= 0x0600) // Windows Vista  
        Windows 95/98/Me Ver … _WIN32_WINDOWS
            MFC App、PC  (Windows CE    )
            #ifdef  _WIN32_WINDOWS
            #if (_WIN32_WINDOWS >= 0x0400) // Windows 95  
            #if (_WIN32_WINDOWS >= 0x0410) // Windows 98  
            #if (_WIN32_WINDOWS >= 0x0500) // Windows Me  
        Windows NT  Ver … _WIN32_WINNT
            #if (_WIN32_WINNT  >= 0x0500) // Windows 2000  
            #if (_WIN32_WINNT  >= 0x0501) // Windows XP  
            #if (_WIN32_WINNT  >= 0x0600) // Windows Vista  
        Windows CE(PocketPC )
        #ifdef  _WIN32_WCE
        Windows CE … WINCEOSVER
        Windows CE
        WCE_IF
        Int ernet Explorer Ver … _WIN32_IE 
    Cygwin
        Cygwin
        #ifdef  __CYGWIN__
        32bit Cygwin(       64bit )
        #ifdef  __CYGWIN32__
        MinGW(-mno-cygwin  )
        #ifdef  __MINGW32__

좋은 웹페이지 즐겨찾기