Makefile HEADERS-entry starting with # - question [solved]



  • Hello,

    i tried defining the headers-entry like this:

    @HEADERS += # GLOBALS
    globals/properties.h
    ...@

    If the first line is a comment like this, qMake (tested only within qtCreator) removes the folder "header files" and gives an error :

    <path to project>\src\src.pro:25: Error: Extra characters after test expression.

    This

    @HEADERS += globals/properties.h @

    or this

    @HEADERS +=
    # GLOBALS
    globals/classproperties.h
    ...@

    are ok.

    Is this a common issue or can be a bug?


  • Lifetime Qt Champion

    Hi,

    @
    HEADERS += # GLOBALS << you are missing a backslash after +=
    globals/properties.h

    @



  • Hi,

    i think i expected that the tokens will be parsed like in c/c++. Any spaces after the keyword should be ignored. But this is common i guess.


  • Lifetime Qt Champion

    It's rather like the multiline string case, you need to tell the parser that there will be something following so it must continue to read



  • Ok, got it. Thanks.


  • Lifetime Qt Champion

    You're welcome !

    If that answers your questions, then please update the thread title prepending [solved] so other forum users may know a solution has been found :)



  • Ok, done :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.