Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qmake gives "Unknown test function: for"
Qt 6.11 is out! See what's new in the release blog

Qmake gives "Unknown test function: for"

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 1 Posters 4.6k 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.
  • L Offline
    L Offline
    Lindley
    wrote on last edited by
    #1

    I'm trying to use a for loop in my .pri file:

    [code]
    CONFIG += info
    info {
    for (thing,THINGS) {
    # stuff
    }
    }
    [/code]

    But when I attempt to build, I get the error:
    Unknown test function: for

    My google-fu has so far turned up several suggestions that I might be using the qmake from QT3 rather than QT4; however, I've checked one of the Makefiles produced before I added this line, and it says
    [quote]
    #############################################################################

    Makefile for building: UnitTests

    Generated by qmake (2.01a) (Qt 4.8.5) on: Thu Dec 12 12:46:52 2013

    Project: ../qmake/UnitTests.pro

    Template: app

    Command: /usr/local/Trolltech/Qt-4.8.5/bin/qmake -spec /usr/local/Trolltech/Qt-4.8.5/mkspecs/linux-g++ CONFIG+=debug CONFIG+=declarative_debug -o Makefile ../qmake/UnitTests.pro

    #############################################################################
    [/quote]
    so it doesn't look like that's the problem in my case.

    Any help?

    1 Reply Last reply
    0
    • L Offline
      L Offline
      Lindley
      wrote on last edited by
      #2

      Found the problem. Apparently for(thing,THINGS) works fine; for (thing,THINGS) does not. Note the whitespace.

      1 Reply Last reply
      0

      • Login

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