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. I am getting No such file or directory error for every Qt include inserted in C++ code
Forum Updated to NodeBB v4.3 + New Features

I am getting No such file or directory error for every Qt include inserted in C++ code

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
28 Posts 5 Posters 13.5k Views 3 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.
  • Christian EhrlicherC Christian Ehrlicher

    The project publishes .vcproj file which is wrong - it only must publish the .pro files where you generate your VisualStudio solution files from. Otherwise the paths to the Qt installation is not correct inside those files (as you can see). Throw away all .vcproj and .sln files and run qmake on the Qt command prompt after you installed the correct Qt version.

    S Offline
    S Offline
    sc0rp10n
    wrote on last edited by
    #4

    @Christian-Ehrlicher so i removed all those files, ran qmake -project in .client folder and then tried running qmake <file_name>.pro. But I got error/warning:

    Info: creating stash file C:\Users\princ\source\repos\TS3Tunnel\TS3Tunnel.Client\.qmake.stash                           RCC: Warning: No resources in 'MainWindow.qrc'.                                                                         RCC: Warning: No resources in 'MainWindow.qrc'. 
    

    So, now should I compile it in visual code?

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by Christian Ehrlicher
      #5

      @sc0rp10n said in I am getting No such file or directory error for every Qt include inserted in C++ code:

      qmake -project

      Why? You should not re-create the pro file. You should run qmake -tp vc - see https://doc.qt.io/qt-5/qmake-running.html#general-options

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

      S 2 Replies Last reply
      1
      • Christian EhrlicherC Christian Ehrlicher

        @sc0rp10n said in I am getting No such file or directory error for every Qt include inserted in C++ code:

        qmake -project

        Why? You should not re-create the pro file. You should run qmake -tp vc - see https://doc.qt.io/qt-5/qmake-running.html#general-options

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

        @Christian-Ehrlicher the command you mentioned, does not do anything and just prints help of qmake . Here vc is prefix name (from what I understood through docs). But that would be different for mine. How to see that?
        Also there is no default .pro file, so why shouldn't I create it?

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #7

          I was pretty sure there was a .pro file in the github link you gave me.
          Then you have to either fixup the vcproj by yourself where we can't help or create two separate pro files for the both subdirs with qmake -project QT +=widgets and hope the automatically generated pro file is correct, then run qmake -tp vc to generate the vcproj files.

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

          S 1 Reply Last reply
          0
          • Christian EhrlicherC Christian Ehrlicher

            @sc0rp10n said in I am getting No such file or directory error for every Qt include inserted in C++ code:

            qmake -project

            Why? You should not re-create the pro file. You should run qmake -tp vc - see https://doc.qt.io/qt-5/qmake-running.html#general-options

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

            @Christian-Ehrlicher in first reply, you said to choose correct version of Qt, so which one should I choose?

            Christian EhrlicherC J.HilkJ 2 Replies Last reply
            0
            • S sc0rp10n

              @Christian-Ehrlicher in first reply, you said to choose correct version of Qt, so which one should I choose?

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

              @sc0rp10n said in I am getting No such file or directory error for every Qt include inserted in C++ code:

              so which one should I choose?

              Don't know which version - depends on what the repo needs. But it must be for MSVC.

              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 sc0rp10n

                @Christian-Ehrlicher in first reply, you said to choose correct version of Qt, so which one should I choose?

                J.HilkJ Online
                J.HilkJ Online
                J.Hilk
                Moderators
                wrote on last edited by
                #10

                @sc0rp10n the readme tells us: tested with Qt 5.10.1 (on windows):
                195c7c7c-6271-4882-9b63-3170e2ef0a82-image.png


                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.

                S 1 Reply Last reply
                0
                • Christian EhrlicherC Christian Ehrlicher

                  I was pretty sure there was a .pro file in the github link you gave me.
                  Then you have to either fixup the vcproj by yourself where we can't help or create two separate pro files for the both subdirs with qmake -project QT +=widgets and hope the automatically generated pro file is correct, then run qmake -tp vc to generate the vcproj files.

                  S Offline
                  S Offline
                  sc0rp10n
                  wrote on last edited by
                  #11

                  @Christian-Ehrlicher The .pro file is already there for server client but for windows client it can not be used, because both are different. I am running qmake -project in windows client folder which creates a different file from the one already present in server client.

                  1 Reply Last reply
                  0
                  • J.HilkJ J.Hilk

                    @sc0rp10n the readme tells us: tested with Qt 5.10.1 (on windows):
                    195c7c7c-6271-4882-9b63-3170e2ef0a82-image.png

                    S Offline
                    S Offline
                    sc0rp10n
                    wrote on last edited by
                    #12

                    @J-Hilk ok, i am downloading it, can you tell me steps of command to run to build/compile the client? I don't have much +ve experience with it. @Christian-Ehrlicher

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      kalek33
                      wrote on last edited by kalek33
                      #13

                      Hello everybody. I have to admit that the @sc0rp10n problem was double-checked myself. I just can't solve it, I ask for help from someone who might have an idea/solution on how to fix it! Thanks in advance. @Christian-Ehrlicher

                      Regards.

                      SGaistS 1 Reply Last reply
                      0
                      • K kalek33

                        Hello everybody. I have to admit that the @sc0rp10n problem was double-checked myself. I just can't solve it, I ask for help from someone who might have an idea/solution on how to fix it! Thanks in advance. @Christian-Ehrlicher

                        Regards.

                        SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #14

                        @kalek33 hi and welcome to devnet,

                        The suggestions still holds: use

                        qmake -project QT+=widgets
                        

                        In the client folder to create the .pro file.

                        Then you can use Qt Creator to build it.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        K S 2 Replies Last reply
                        0
                        • SGaistS SGaist

                          @kalek33 hi and welcome to devnet,

                          The suggestions still holds: use

                          qmake -project QT+=widgets
                          

                          In the client folder to create the .pro file.

                          Then you can use Qt Creator to build it.

                          K Offline
                          K Offline
                          kalek33
                          wrote on last edited by
                          #15

                          @SGaist Ok, thanks for the reply, but what you say, he has not already tried @sc0rp10n without success?

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #16

                            No, it's the command to generate the Visual Studio project that failed.

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            K 1 Reply Last reply
                            0
                            • SGaistS SGaist

                              No, it's the command to generate the Visual Studio project that failed.

                              K Offline
                              K Offline
                              kalek33
                              wrote on last edited by
                              #17

                              @SGaist Sure, but why didn't he succeed... and if he didn't succeed either?

                              SGaistS 1 Reply Last reply
                              0
                              • K kalek33

                                @SGaist Sure, but why didn't he succeed... and if he didn't succeed either?

                                SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #18

                                @kalek33 said in I am getting No such file or directory error for every Qt include inserted in C++ code:

                                @SGaist Sure, but why didn't he succeed... and if he didn't succeed either?

                                You do realize that with the information given there's no way to know ?

                                In between, you can either use Qt Creator to build the project using the pro file or install the Qt VS tools and import the project into Visual Studio. In any case, you are not locked out of progress.

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                K 1 Reply Last reply
                                0
                                • SGaistS SGaist

                                  @kalek33 said in I am getting No such file or directory error for every Qt include inserted in C++ code:

                                  @SGaist Sure, but why didn't he succeed... and if he didn't succeed either?

                                  You do realize that with the information given there's no way to know ?

                                  In between, you can either use Qt Creator to build the project using the pro file or install the Qt VS tools and import the project into Visual Studio. In any case, you are not locked out of progress.

                                  K Offline
                                  K Offline
                                  kalek33
                                  wrote on last edited by
                                  #19

                                  @SGaist I've been trying for almost 24 hours, could you try it yourself and see if it gives you the same mistake pretty please?

                                  1 Reply Last reply
                                  0
                                  • SGaistS Offline
                                    SGaistS Offline
                                    SGaist
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #20

                                    No because I do not have a Windows machine at hand.
                                    However my constations about missing information applies.

                                    What did you exactly do ?
                                    Which error messages did you got ?
                                    Which version of Qt are you using ?

                                    Interested in AI ? www.idiap.ch
                                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                    K 1 Reply Last reply
                                    0
                                    • SGaistS SGaist

                                      No because I do not have a Windows machine at hand.
                                      However my constations about missing information applies.

                                      What did you exactly do ?
                                      Which error messages did you got ?
                                      Which version of Qt are you using ?

                                      K Offline
                                      K Offline
                                      kalek33
                                      wrote on last edited by
                                      #21

                                      @SGaist I use 5.10.1 And the .pro file is already there for server client but for windows client it can not be used, because both are different. I am running qmake -project in windows client folder which creates a different file from the one already present in server client.

                                      1 Reply Last reply
                                      0
                                      • SGaistS Offline
                                        SGaistS Offline
                                        SGaist
                                        Lifetime Qt Champion
                                        wrote on last edited by
                                        #22

                                        And what is the issue with that file ?
                                        These two folders have different content so that's normal the .pro files are different.

                                        Interested in AI ? www.idiap.ch
                                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                        S 2 Replies Last reply
                                        1
                                        • SGaistS SGaist

                                          @kalek33 hi and welcome to devnet,

                                          The suggestions still holds: use

                                          qmake -project QT+=widgets
                                          

                                          In the client folder to create the .pro file.

                                          Then you can use Qt Creator to build it.

                                          S Offline
                                          S Offline
                                          sc0rp10n
                                          wrote on last edited by
                                          #23

                                          @SGaist I did this with Qt 5.10.1 MSVC 2015
                                          I opened the .pro file in QtCreator and built TS3Tunnel.client
                                          This is the error it gives

                                          C:\Users\princ\Downloads\TS3Tunnel\TS3Tunnel.Client\Client.h:28: error: C1083: Cannot open include file: 'opus/opus.h': No such file or directory
                                          C:\Users\princ\Downloads\TS3Tunnel\TS3Tunnel.Client\Client.h:28: error: C1083: Cannot open include file: 'opus/opus.h': No such file or directory
                                          C:\Users\princ\Downloads\TS3Tunnel\TS3Tunnel.Client\Client.h:28: error: C1083: Cannot open include file: 'opus/opus.h': No such file or directory
                                          C:\Users\princ\Downloads\TS3Tunnel\TS3Tunnel.Client\Client.h:28: error: C1083: Cannot open include file: 'opus/opus.h': No such file or directory
                                          C:\Users\princ\Downloads\TS3Tunnel\TS3Tunnel.Client\Client.h:28: error: C1083: Cannot open include file: 'opus/opus.h': No such file or directory
                                          :-1: warning: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe" is used by qmake, but "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX64\x64\cl.exe" is configured in the kit.
                                          Please update your kit (Desktop Qt 5.10.1 MSVC2015 64bit) or choose a mkspec for qmake that matches your target environment better.
                                          

                                          Should I install VS 2015 and uninstall 2019?
                                          I have installed PortAudio from vcpkg

                                          The opus error still comes if I run .\vcpkg\vcpkg install opus:x64-windows command to install opus. The opus.h is present after running this command in "C:\src\vcpkg\installed\x64-windows\include\opus"

                                          Also after installing opus the last warning error does not come, when I build from Qt creator

                                          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