Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Constant errors and missing files
Forum Updated to NodeBB v4.3 + New Features

Constant errors and missing files

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
10 Posts 5 Posters 704 Views
  • 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.
  • S Offline
    S Offline
    SmoothG
    wrote on last edited by
    #1

    After several instalations on both my laptop and PC I am still having troubles with clangd telling me that I am missing files.

    For example
    main.cpp:1:10: 'iostream' file not found

    or
    main.cpp:9:5: Use of undeclared identifier 'cin' (on a code that I have checked with online c++ compiler and it worked flawlessly)

    It is my first compiler on this PC, I did not install Visual Studio or any other compiler, I have tried using tutorials on how to properly install Qt Creator and tried manually and automatically select files on installer to no avail.

    JonBJ J.HilkJ 2 Replies Last reply
    0
    • S SmoothG

      After several instalations on both my laptop and PC I am still having troubles with clangd telling me that I am missing files.

      For example
      main.cpp:1:10: 'iostream' file not found

      or
      main.cpp:9:5: Use of undeclared identifier 'cin' (on a code that I have checked with online c++ compiler and it worked flawlessly)

      It is my first compiler on this PC, I did not install Visual Studio or any other compiler, I have tried using tutorials on how to properly install Qt Creator and tried manually and automatically select files on installer to no avail.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @SmoothG
      To be 100% clear: these errors are seen only while you are editing, if you try actually running the compiler (on your machine, not online checker) the header file is found OK?

      S 1 Reply Last reply
      0
      • JonBJ JonB

        @SmoothG
        To be 100% clear: these errors are seen only while you are editing, if you try actually running the compiler (on your machine, not online checker) the header file is found OK?

        S Offline
        S Offline
        SmoothG
        wrote on last edited by
        #3

        @JonB

        All of sudden I can't run projects (the button is greyed out). The header file when running projects before was found OK but now I can't even run projects. Before errors appeared mainly when trying to load projects that I've made before

        jsulmJ 1 Reply Last reply
        0
        • S SmoothG

          @JonB

          All of sudden I can't run projects (the button is greyed out). The header file when running projects before was found OK but now I can't even run projects. Before errors appeared mainly when trying to load projects that I've made before

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

          @SmoothG said in Constant errors and missing files:

          I can't run projects

          Run qmake again. Or, if it's CMake project, load the project again.

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

          S 1 Reply Last reply
          0
          • S SmoothG

            After several instalations on both my laptop and PC I am still having troubles with clangd telling me that I am missing files.

            For example
            main.cpp:1:10: 'iostream' file not found

            or
            main.cpp:9:5: Use of undeclared identifier 'cin' (on a code that I have checked with online c++ compiler and it worked flawlessly)

            It is my first compiler on this PC, I did not install Visual Studio or any other compiler, I have tried using tutorials on how to properly install Qt Creator and tried manually and automatically select files on installer to no avail.

            J.HilkJ Offline
            J.HilkJ Offline
            J.Hilk
            Moderators
            wrote on last edited by
            #5

            @SmoothG said in Constant errors and missing files:

            It is my first compiler on this PC, I did not install Visual Studio or any other compiler

            what is your first compiler ? QtCreator ? Because Creator is no compiler it's just an IDE and a Qt is only a library. You will need a compiler from somewhere!!!

            There is an option to also download and install mingw when you launch the QtInstaller. That is the windows version of the gnu compiler but it only works with the mingw versions of the Qt Library.


            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


            Q: What's that?
            A: It's blue light.
            Q: What does it do?
            A: It turns blue.

            1 Reply Last reply
            1
            • jsulmJ jsulm

              @SmoothG said in Constant errors and missing files:

              I can't run projects

              Run qmake again. Or, if it's CMake project, load the project again.

              S Offline
              S Offline
              SmoothG
              wrote on last edited by SmoothG
              #6

              @jsulm
              I selected MinGW while installing qt creator. It says that there are missing files and errors when I start new project or load old one but it compiles just fine

              jsulmJ 1 Reply Last reply
              0
              • S SmoothG

                @jsulm
                I selected MinGW while installing qt creator. It says that there are missing files and errors when I start new project or load old one but it compiles just fine

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

                @SmoothG said in Constant errors and missing files:

                It says that there are missing files and errors when I start new project or load old one

                Those errors probably come from code model which sometimes produces wrong errors. Also, in some cases it can help to just build the project.

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

                S 1 Reply Last reply
                1
                • jsulmJ jsulm

                  @SmoothG said in Constant errors and missing files:

                  It says that there are missing files and errors when I start new project or load old one

                  Those errors probably come from code model which sometimes produces wrong errors. Also, in some cases it can help to just build the project.

                  S Offline
                  S Offline
                  SmoothG
                  wrote on last edited by
                  #8

                  @jsulm
                  Building did not help there are still errors but code works fine.
                  I couldn't run projects because I only opened main.cpp files

                  Christian EhrlicherC jsulmJ 2 Replies Last reply
                  0
                  • S SmoothG

                    @jsulm
                    Building did not help there are still errors but code works fine.
                    I couldn't run projects because I only opened main.cpp files

                    Christian EhrlicherC Offline
                    Christian EhrlicherC Offline
                    Christian Ehrlicher
                    Lifetime Qt Champion
                    wrote on last edited by Christian Ehrlicher
                    #9

                    @SmoothG said in Constant errors and missing files:

                    because I only opened main.cpp files

                    And how should QtCreator know where to look for the include files then?

                    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                    Visit the Qt Academy at https://academy.qt.io/catalog

                    1 Reply Last reply
                    0
                    • S SmoothG

                      @jsulm
                      Building did not help there are still errors but code works fine.
                      I couldn't run projects because I only opened main.cpp files

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

                      @SmoothG said in Constant errors and missing files:

                      I couldn't run projects because I only opened main.cpp files

                      Well, of course. You need to open the project file (either *.pro file or CMakeLists.txt)...

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

                      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