Results 1 to 3 of 3

Thread: QMake Platform Flags Problems

  1. #1

    Question QMake Platform Flags Problems

    Hello,

    I have a pro file and encountered two problems which I do not understand. Maybe some one can help me.
    I am using Qt 5.4 on a Mac as well as in a Parallels Windows VM.

    When I use an 'else' like this:

    win32
    {
    }
    else
    {
    }

    I get a parse error saying that 'else' is unexpected.

    When I use the infamous Macintosh flag setup

    unix:!macx
    {
    LIBS = OhNoooo
    }

    This still applies to Mac, even better is also applies to Windows.

    I have seen both cases a lot across the internet so I would expect them to work. Could someone point me in the right direction?

    Thanks
    Dan

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QMake Platform Flags Problems

    I think the opening brace needs to go on the same line as the condition.
    Same for the else block

    Cheers,
    _

  3. #3

    Default Re: QMake Platform Flags Problems

    Thanks this was indeed the problem.

    win32
    {
    }

    does not work

    win32 {
    }

    works fine

Similar Threads

  1. How to specify qmake-generated target in a platform independent way
    By dvolosnykh in forum Installation and Deployment
    Replies: 1
    Last Post: 9th March 2013, 09:04
  2. QMAKE FLAGS in qmake.conf for solaris-cc-64 uses old flags
    By qmake_query in forum Installation and Deployment
    Replies: 0
    Last Post: 16th October 2012, 09:11
  3. Overriding flags in qmake.conf
    By Ronayn in forum Qt Programming
    Replies: 1
    Last Post: 15th June 2011, 15:50
  4. platform specific qmake versions ?
    By andjesto in forum Newbie
    Replies: 1
    Last Post: 17th January 2011, 18:45
  5. QMake multiple platform tags
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 28th February 2010, 16:24

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.