Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Behind the Scenes
  3. Wiki Discussion
  4. Compiling Qt Application with source code (no .pro file)
Forum Updated to NodeBB v4.3 + New Features

Compiling Qt Application with source code (no .pro file)

Scheduled Pinned Locked Moved Solved Wiki Discussion
19 Posts 4 Posters 6.3k 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.
  • J jsulm
    9 Feb 2021, 11:41

    @The-Times You can simply create a default widget app with qrc resource file in QtCreator and copy its pro file, then adjust that pro file.

    T Offline
    T Offline
    The Times
    wrote on 9 Feb 2021, 12:11 last edited by
    #4

    @jsulm Thanks for the reply! Unfortunately, I don't have the pro file available, what can I do in this case?

    J 1 Reply Last reply 9 Feb 2021, 12:17
    0
    • T The Times
      9 Feb 2021, 12:11

      @jsulm Thanks for the reply! Unfortunately, I don't have the pro file available, what can I do in this case?

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 9 Feb 2021, 12:17 last edited by
      #5

      @The-Times Please read once more what I wrote

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

      T 1 Reply Last reply 9 Feb 2021, 12:27
      0
      • J jsulm
        9 Feb 2021, 12:17

        @The-Times Please read once more what I wrote

        T Offline
        T Offline
        The Times
        wrote on 9 Feb 2021, 12:27 last edited by
        #6

        @jsulm Ohh sorry, I didn't fully read your sentence first time.. Thanks for taking the time to reply, will be trying this soon :)

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 9 Feb 2021, 19:36 last edited by
          #7

          Hi,

          Another solution is to call "qmake -project" in the folder where these files are. It will build a basic .pro file based on these files. You will have to adjust some stuff like the modules to use.

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

          T 1 Reply Last reply 10 Feb 2021, 03:49
          3
          • J jsulm
            9 Feb 2021, 11:41

            @The-Times You can simply create a default widget app with qrc resource file in QtCreator and copy its pro file, then adjust that pro file.

            T Offline
            T Offline
            The Times
            wrote on 10 Feb 2021, 02:48 last edited by
            #8
            This post is deleted!
            1 Reply Last reply
            0
            • J jsulm
              9 Feb 2021, 11:41

              @The-Times You can simply create a default widget app with qrc resource file in QtCreator and copy its pro file, then adjust that pro file.

              T Offline
              T Offline
              The Times
              wrote on 10 Feb 2021, 03:14 last edited by
              #9

              @jsulm Thanks, I managed to create the .pro file and import it to VS. However when I build the solution, I get this error :
              " Error 1 error MSB3073: The command ""D:\CHAI3D\Qt\5.5\msvc2013_64\bin\rcc.exe" --list "....\CHAI3D" > "x64\Debug\rcc_list.txt" 2> nul" exited with code 1. C:\Users\Krystal\AppData\Local\QtMsBuild\qtrcc.targets 74 5 MyGui"

              Do you have any idea on how I could go on about resolving it?

              J 1 Reply Last reply 10 Feb 2021, 05:42
              0
              • S SGaist
                9 Feb 2021, 19:36

                Hi,

                Another solution is to call "qmake -project" in the folder where these files are. It will build a basic .pro file based on these files. You will have to adjust some stuff like the modules to use.

                T Offline
                T Offline
                The Times
                wrote on 10 Feb 2021, 03:49 last edited by
                #10

                @SGaist Thanks for the reply! I believe I have successfully created the .pro file but when I try to compile the solution in VS studio, I get the following error:

                error MSB3073: The command ""D:\CHAI3D\Qt\5.5\msvc2013_64\bin\rcc.exe" --list "....\CHAI3D" > "x64\Debug\rcc_list.txt" 2> nul" exited with code 1. C:\Users\krystal\AppData\Local\QtMsBuild\qtrcc.targets 74 5 MyGui

                Do you have any idea why this is happening?

                1 Reply Last reply
                0
                • T The Times
                  10 Feb 2021, 03:14

                  @jsulm Thanks, I managed to create the .pro file and import it to VS. However when I build the solution, I get this error :
                  " Error 1 error MSB3073: The command ""D:\CHAI3D\Qt\5.5\msvc2013_64\bin\rcc.exe" --list "....\CHAI3D" > "x64\Debug\rcc_list.txt" 2> nul" exited with code 1. C:\Users\Krystal\AppData\Local\QtMsBuild\qtrcc.targets 74 5 MyGui"

                  Do you have any idea on how I could go on about resolving it?

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 10 Feb 2021, 05:42 last edited by
                  #11

                  @The-Times Can you build a simple Qt app created via the app template, or a Qt example app?

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

                  T 2 Replies Last reply 10 Feb 2021, 05:43
                  0
                  • J jsulm
                    10 Feb 2021, 05:42

                    @The-Times Can you build a simple Qt app created via the app template, or a Qt example app?

                    T Offline
                    T Offline
                    The Times
                    wrote on 10 Feb 2021, 05:43 last edited by
                    #12

                    @jsulm Yes, I can build a simple Qt app, it runs as expected

                    J 1 Reply Last reply 10 Feb 2021, 05:49
                    0
                    • T The Times
                      10 Feb 2021, 05:43

                      @jsulm Yes, I can build a simple Qt app, it runs as expected

                      J Offline
                      J Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 10 Feb 2021, 05:49 last edited by
                      #13

                      @The-Times Can you post your pro file?

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

                      T 1 Reply Last reply 10 Feb 2021, 06:12
                      0
                      • J jsulm
                        10 Feb 2021, 05:42

                        @The-Times Can you build a simple Qt app created via the app template, or a Qt example app?

                        T Offline
                        T Offline
                        The Times
                        wrote on 10 Feb 2021, 05:59 last edited by
                        #14

                        @jsulm Do you mean this?

                        #-------------------------------------------------
                        #
                        # Project created by QtCreator 2021-02-10T10:04:29
                        #
                        #-------------------------------------------------
                        
                        QT       += core gui
                        
                        greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
                        
                        TARGET = MyGui
                        TEMPLATE = app
                        
                        
                        SOURCES += main.cpp\
                           ModelDemo.cpp \
                           ModelWidget.cpp
                        
                        HEADERS  += \
                           ui_modeldemo.h \
                           ui_ModelWidget.h
                        
                        FORMS    += \
                           ../../CHAI3D Application/Qt Program/external/ModelDemo.ui \
                           ../../CHAI3D Application/Qt Program/external/ModelDemo.ui \
                           ../../CHAI3D Application/Qt Program/external/ModelDemo.ui \
                           ModelDemo.ui
                        
                        RESOURCES += \
                           ../../CHAI3D Application/Qt Program/external/ModelDemo.qrc \
                           ModelDemo.qrc
                        
                        DISTFILES += \
                           ../../external/CHAI3D/CHAI3D-VS2013.vcxproj
                        
                        
                        1 Reply Last reply
                        0
                        • J jsulm
                          10 Feb 2021, 05:49

                          @The-Times Can you post your pro file?

                          T Offline
                          T Offline
                          The Times
                          wrote on 10 Feb 2021, 06:12 last edited by
                          #15

                          @jsulm I just don't even know what to try to do to resolve this error:

                          "error MSB3073: The command ""D:\CHAI3D\Qt\5.5\msvc2013_64\bin\rcc.exe" --list "....\CHAI3D" > "x64\Debug\rcc_list.txt" 2> nul" exited with code 1. C:\Users\krystal\AppData\Local\QtMsBuild\qtrcc.targets 74 5 MyGui"

                          J 1 Reply Last reply 10 Feb 2021, 07:06
                          0
                          • T The Times
                            10 Feb 2021, 06:12

                            @jsulm I just don't even know what to try to do to resolve this error:

                            "error MSB3073: The command ""D:\CHAI3D\Qt\5.5\msvc2013_64\bin\rcc.exe" --list "....\CHAI3D" > "x64\Debug\rcc_list.txt" 2> nul" exited with code 1. C:\Users\krystal\AppData\Local\QtMsBuild\qtrcc.targets 74 5 MyGui"

                            J Offline
                            J Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on 10 Feb 2021, 07:06 last edited by
                            #16

                            @The-Times I'm wondering why most of your files are two levels above the pro file (../../*), but ModelDemo.qrc is not? Same for ModelDemo.ui.
                            Why don't you put the pro file into CHAI3D Application/Qt Program/external? Everything belonging to a project should be in same folder, else it's a mess.

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

                            T 2 Replies Last reply 10 Feb 2021, 09:10
                            1
                            • J jsulm
                              10 Feb 2021, 07:06

                              @The-Times I'm wondering why most of your files are two levels above the pro file (../../*), but ModelDemo.qrc is not? Same for ModelDemo.ui.
                              Why don't you put the pro file into CHAI3D Application/Qt Program/external? Everything belonging to a project should be in same folder, else it's a mess.

                              T Offline
                              T Offline
                              The Times
                              wrote on 10 Feb 2021, 09:10 last edited by
                              #17

                              @jsulm Really, thanks for your help. I reordered the files and made sure to organize everything, and understood why the error was occurring. Now I am getting other different errors and this is starting to feel like a never-ending cycle

                              1 Reply Last reply
                              0
                              • J jsulm
                                10 Feb 2021, 07:06

                                @The-Times I'm wondering why most of your files are two levels above the pro file (../../*), but ModelDemo.qrc is not? Same for ModelDemo.ui.
                                Why don't you put the pro file into CHAI3D Application/Qt Program/external? Everything belonging to a project should be in same folder, else it's a mess.

                                T Offline
                                T Offline
                                The Times
                                wrote on 11 Feb 2021, 12:39 last edited by
                                #18

                                @jsulm Hi! It's me again :). Ahh finally, I just compiled it successfully! I couldn't have done it without you!

                                J 1 Reply Last reply 11 Feb 2021, 12:52
                                1
                                • T The Times
                                  11 Feb 2021, 12:39

                                  @jsulm Hi! It's me again :). Ahh finally, I just compiled it successfully! I couldn't have done it without you!

                                  J Offline
                                  J Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on 11 Feb 2021, 12:52 last edited by
                                  #19

                                  @The-Times Happy coding!

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

                                  1 Reply Last reply
                                  0

                                  13/19

                                  10 Feb 2021, 05:49

                                  • Login

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