Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Preproccessing
Forum Updated to NodeBB v4.3 + New Features

Preproccessing

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 572 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CrazyDave
    wrote on last edited by
    #1

    I am not very familiar with how to incorporate predefined constants into a pro file. I have a lot of code written for QT and I am trying to incorporate the source from OpenSCADA into my project. I have encountered some problems relating to prepossessing. In the OpenSCADA there are the following constants used throughout the code:
    PACKAGE
    PACKAGE_STRING
    PACKAGE_NAME
    VERSION

    I take it they are version control strings used for distribution. I have tried using "#define" statements in a .config file and "DEFINES+=" statements in the project file. An example of the error:

    "error: expected ‘;’ before ‘PACKAGE_NAME’"

    "  <title>" PACKAGE_NAME ": " + SYS->id() + "</title>\n"
    

    I have tried the defines as '#define PACKAGE_NAME "Test"' and '#define PACKAGE_NAME +"Test"+', what am I doing wrong?

    Thanks

    C 1 Reply Last reply
    0
    • C CrazyDave

      I am not very familiar with how to incorporate predefined constants into a pro file. I have a lot of code written for QT and I am trying to incorporate the source from OpenSCADA into my project. I have encountered some problems relating to prepossessing. In the OpenSCADA there are the following constants used throughout the code:
      PACKAGE
      PACKAGE_STRING
      PACKAGE_NAME
      VERSION

      I take it they are version control strings used for distribution. I have tried using "#define" statements in a .config file and "DEFINES+=" statements in the project file. An example of the error:

      "error: expected ‘;’ before ‘PACKAGE_NAME’"

      "  <title>" PACKAGE_NAME ": " + SYS->id() + "</title>\n"
      

      I have tried the defines as '#define PACKAGE_NAME "Test"' and '#define PACKAGE_NAME +"Test"+', what am I doing wrong?

      Thanks

      C Offline
      C Offline
      CrazyDave
      wrote on last edited by
      #2

      @CrazyDave
      Note that double commander cannot find these constants anywhere in the OpenSCADA source other than inline in the code.

      1 Reply Last reply
      0
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi
        The #DEFINEs +=
        is the way to do it.

        maybe the errors was due to incorrect escaping ?

        https://stackoverflow.com/questions/3348711/add-a-define-to-qmake-with-a-value

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved