Results 1 to 2 of 2

Thread: distinguish windows and unix in Makefile

  1. #1
    Join Date
    Feb 2007
    Location
    Philadelphia, USA
    Posts
    255
    Thanks
    43
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default distinguish windows and unix in Makefile

    How can I distinguish between windows and unix in a Makefile (not using qmake or any such thing)

    if windows {do this}
    if unix {do that}

    Also, does anyone know if there is a #define for windows, e.g.
    #ifdef WINDOWS-OR-SOMETHING
    do this
    #else
    do that
    #endif

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: distinguish windows and unix in Makefile

    Q_OS_WIN
    Q_OS_UNIX

    Check the docs for others.

    Besides that different compilers define different macros regardless if you use Qt or not.

Similar Threads

  1. Strange problem with events on Unix
    By sukanyarn in forum Qt Programming
    Replies: 2
    Last Post: 7th November 2006, 02:45
  2. converting unix exe to windows binary
    By deekayt in forum General Programming
    Replies: 2
    Last Post: 17th September 2006, 01:00

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.