Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. "Use of undeclared indentifier" error messages
Qt 6.12 LTS is out! See what's new in the release blog

"Use of undeclared indentifier" error messages

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 5.7k Views 2 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.
  • G Offline
    G Offline
    Gert van der Zwan
    wrote on last edited by
    #1

    I recently installed, using the online installer, the latest version of Qt/QtCreator (5.12.0, 4.8.0-rc1) on a clean install of Ubuntu 18.04 Everything seems to be working fine when recompiling and running my programs., except for the tons of error messages I get. See screenshot below for the simplest console application. My only additions to the cpp file generated by QtCreator are including iostream, and adding the std::cout line (which generates the message "expected expression). The program runs fine: it opens a console and prints "hello world" as instructed.

    In my other programs i get messages like "variable has incomplete type 'void' ", "expected identifier or '(' " and numerous others, but in all cases I've looked so far they do what I expect them to. 0_1548711381761_helloworld.png

    The program was compiled with: CONFIG += c++11 console. Turning off Clang Code Model (under "Issues") did not change anything.

    Thanks for your help, Gert

    K 1 Reply Last reply
    0
    • G Gert van der Zwan

      I recently installed, using the online installer, the latest version of Qt/QtCreator (5.12.0, 4.8.0-rc1) on a clean install of Ubuntu 18.04 Everything seems to be working fine when recompiling and running my programs., except for the tons of error messages I get. See screenshot below for the simplest console application. My only additions to the cpp file generated by QtCreator are including iostream, and adding the std::cout line (which generates the message "expected expression). The program runs fine: it opens a console and prints "hello world" as instructed.

      In my other programs i get messages like "variable has incomplete type 'void' ", "expected identifier or '(' " and numerous others, but in all cases I've looked so far they do what I expect them to. 0_1548711381761_helloworld.png

      The program was compiled with: CONFIG += c++11 console. Turning off Clang Code Model (under "Issues") did not change anything.

      Thanks for your help, Gert

      K Offline
      K Offline
      koahnig
      wrote on last edited by koahnig
      #2

      @Gert-van-der-Zwan

      Hi and welcome to devnet forum

      You are using a release candidate of Qt creator. In the mean time we have 4.8.1 offically out. I recommend changing to the offical version. That might remove the problem already. Release candidates are still not the final version and may show unwanted behaviour.

      @Gert-van-der-Zwan said in "Use of undeclared indentifier" error messages:

      The program was compiled with: CONFIG += c++11 console. Turning off Clang Code Model (under "Issues") did not change anything.

      This did not switch off the Clang Code Model. It is a plugin and you need to unselect under "Help"->"About Plugins..." under "C++" "ClangCodeModel" and probably restart creator.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      7
      • G Offline
        G Offline
        Gert van der Zwan
        wrote on last edited by
        #3

        Thank you, that helped. When installing I just took the top option for QtCreator. I did look for updates using the maintenance tool, but it did not show any. It still does not, maybe 4.8.1 does not count as an update. Anyway for the moment I am happy again.

        jsulmJ 1 Reply Last reply
        0
        • G Gert van der Zwan

          Thank you, that helped. When installing I just took the top option for QtCreator. I did look for updates using the maintenance tool, but it did not show any. It still does not, maybe 4.8.1 does not count as an update. Anyway for the moment I am happy again.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Gert-van-der-Zwan Well, an RC is newer than current stable version. Simply remove the RC version of QtCreator in Maintenance Tool and then select "Qt/Tools/QtCreator" there,

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          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
          • Unsolved