Results 1 to 3 of 3

Thread: Project file and platform-specific rules

  1. #1
    Join Date
    Feb 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Project file and platform-specific rules

    Greetings my good sirs !

    I'm here to ask a question that has been ask pleny and pleny of times : how to ensure that some rule in the project file will only be used on a given platform.
    Back in the days, only one year ago, this used to do the trick :

    WIN32:LIBS += -lsfml-window -lsfml-graphics -lsfml-system
    UNIX:LIBS += -lyaml -lsfml-window -lsfml-graphics -lsfml-system

    But now, though these aren't considered as syntax error, these lines are completely ignored by qmake. Just as if WIN32 or UNIX were undefined on both platforms. And this is true running both Windows and ArchLinux. I figured they might've been a change but I can't find anything talking about such a thing.

    Maybe someone knows about this ?

  2. #2
    Join Date
    Jun 2011
    Posts
    69
    Thanks
    13
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: Project file and platform-specific rules

    ...یه مرد هیچوقت زمین نمیخوره

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

    Default Re: Project file and platform-specific rules

    Did you check if that was case sensitive?

    qmake Code:
    1. win32:LIBS+= ...
    2. unix:LIBS+= ...
    To copy to clipboard, switch view to plain text mode 

    We use plenty of such rules and they work just fine.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Qt Designer Platform specific font size for labels
    By abey in forum Qt Tools
    Replies: 0
    Last Post: 16th February 2011, 16:21
  2. platform specific qmake versions ?
    By andjesto in forum Newbie
    Replies: 1
    Last Post: 17th January 2011, 18:45
  3. Replies: 1
    Last Post: 11th November 2010, 00:31
  4. Embed platform-specific browser in QT app
    By QPlace in forum Qt Programming
    Replies: 1
    Last Post: 2nd August 2007, 08:35
  5. Platform specific events generation
    By YuriyRusinov in forum Qt Programming
    Replies: 1
    Last Post: 19th April 2007, 10:11

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
  •  
Qt is a trademark of The Qt Company.