Results 1 to 3 of 3

Thread: QMake incorrectly parses TEMPLATE parameter at the command line

  1. #1
    Join Date
    Jul 2008
    Posts
    31
    Thanks
    1
    Thanked 5 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question QMake incorrectly parses TEMPLATE parameter at the command line

    Hi,

    I'm trying to build a widget library. If I type:

    Qt Code:
    1. >> qmake -project "TEMPLATE = lib" MyProject.pro .
    To copy to clipboard, switch view to plain text mode 

    The result is:

    Qt Code:
    1. TEMPLATE = lib
    2. TEMPLATE = app
    3. TARGET =
    4. DEPENDPATH += .
    5. INCLUDEPATH += .
    6.  
    7. # Input
    8. HEADERS += MyProjectImpl.h
    9. FORMS += MyProject.ui
    10. SOURCES += MyProjectImpl.cpp
    To copy to clipboard, switch view to plain text mode 

    As you can see there are two 'TEMPLATE' entries when there should only be one and this breaks my build. The 'TEMPLATE = app' line should be absent.

    Is this a bug or am I using the command line incorrectly?

    [Windows XP SP2, Qt4.4]

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QMake incorrectly parses TEMPLATE parameter at the command line

    You can change the template by passing -t option.

  3. #3
    Join Date
    Jul 2008
    Posts
    31
    Thanks
    1
    Thanked 5 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Smile Re: QMake incorrectly parses TEMPLATE parameter at the command line

    Perfect.
    Qt Code:
    1. qmake -project -t "lib" MyProject.pro .
    To copy to clipboard, switch view to plain text mode 
    works.

    Glad I put this in the newbie 'section'! Thanks.

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.