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. Qt can't include anything
Forum Updated to NodeBB v4.3 + New Features

Qt can't include anything

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
qtcreatorc++programgame
10 Posts 4 Posters 3.1k 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.
  • N Offline
    N Offline
    NoName97
    wrote on 30 Dec 2017, 13:54 last edited by NoName97
    #1

    I have a problem with Qt. I made some code yesterday and yesterday
    everything worked fine, but today it doesn't want to compile. I reinstalled Qt two times and still got same message on different projects. Someone know how to deal with this? Here is error that i got from compile output

    C:/Qt/Tools/mingw492_32/bin/mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory 'C:/Users/michal/Documents/build-Game_2-Desktop_Qt_5_6_3_MinGW_32bit-Debug'
    g++ -c -pipe -fno-keep-inline-dllexport -g -std=gnu++0x -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_MULTIMEDIA_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I..\Game_2 -I. -I..\..\..\..\Qt\5.6.3\mingw49_32\include -I..\..\..\..\Qt\5.6.3\mingw49_32\include\QtMultimedia -I..\..\..\..\Qt\5.6.3\mingw49_32\include\QtWidgets -I..\..\..\..\Qt\5.6.3\mingw49_32\include\QtGui -I..\..\..\..\Qt\5.6.3\mingw49_32\include\QtANGLE -I..\..\..\..\Qt\5.6.3\mingw49_32\include\QtNetwork -I..\..\..\..\Qt\5.6.3\mingw49_32\include\QtCore -Idebug -I. -I..\..\..\..\Qt\5.6.3\mingw49_32\mkspecs\win32-g++  -o debug\game.o ..\Game_2\game.cpp
    g++ -c -pipe -fno-keep-inline-dllexport -g -std=gnu++0x -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_MULTIMEDIA_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I..\Game_2 -I. -I..\..\..\..\Qt\5.6.3\mingw49_32\include -I..\..\..\..\Qt\5.6.3\mingw49_32\include\QtMultimedia -I..\..\..\..\Qt\5.6.3\mingw49_32\include\QtWidgets -I..\..\..\..\Qt\5.6.3\mingw49_32\include\QtGui -I..\..\..\..\Qt\5.6.3\mingw49_32\include\QtANGLE -I..\..\..\..\Qt\5.6.3\mingw49_32\include\QtNetwork -I..\..\..\..\Qt\5.6.3\mingw49_32\include\QtCore -Idebug -I. -I..\..\..\..\Qt\5.6.3\mingw49_32\mkspecs\win32-g++  -o debug\bullet.o ..\Game_2\bullet.cpp
    ..\Game_2\bullet.cpp:6:31: warning: unused parameter 'parent' [-Wunused-parameter]
     Bullet::Bullet(QGraphicsItem *parent){
                                   ^
    g++ -pipe -fno-keep-inline-dllexport -g -std=gnu++0x -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_MULTIMEDIA_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN    ../Game_2/bullet.cpp   -o ../Game_2/bullet
    In file included from ../Game_2/bullet.cpp:2:0:
    ../Game_2/bullet.h:3:19: fatal error: QObject: No such file or directory
     #include <QObject>
                       ^
    compilation terminated.
    <builtin>: recipe for target '../Game_2/bullet' failed
    mingw32-make[1]: Leaving directory 'C:/Users/michal/Documents/build-Game_2-Desktop_Qt_5_6_3_MinGW_32bit-Debug'
    makefile:34: recipe for target 'debug' failed
    mingw32-make[1]: *** [../Game_2/bullet] Error 1
    mingw32-make: *** [debug] Error 2
    14:46:40: The process "C:\Qt\Tools\mingw492_32\bin\mingw32-make.exe" exited with code 2.
    Error while building/deploying project Game_2 (kit: Desktop Qt 5.6.3 MinGW 32bit)
    When executing step "Make"
    14:46:40: Elapsed time: 00:03.
    
    

    And here is a code:
    https://github.com/michaloxs/Game_2
    I dunno what is going on. I think that something in bullet class isn't right because i got an error from there.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on 30 Dec 2017, 14:27 last edited by
      #2

      Hi, welcome to the forum.

      Try this:
      Close Qt Creator.
      Delete Game_2.pro.user file.
      Delete the C:/Users/michal/Documents/build-Game_2-Desktop_Qt_5_6_3_MinGW_32bit-Debug and C:/Users/michal/Documents/build-Game_2-Desktop_Qt_5_6_3_MinGW_32bit-Release directories.
      Open Qt Creator and your project, select one kit and build.

      Btw. The .user file is a local, user specific configuration file. You shouldn't put that in a repository.
      Btw.2 Your .user file indicates that you have configured your project to use 5 different Qt kits. Was that really your intention?

      1 Reply Last reply
      2
      • N Offline
        N Offline
        NoName97
        wrote on 30 Dec 2017, 17:17 last edited by
        #3

        I did what you wrote and still same problem. That wasn't my intention to use 5 Qt kits, i am new to Qt so i still learning how to use this.

        M 1 Reply Last reply 30 Dec 2017, 17:27
        0
        • N NoName97
          30 Dec 2017, 17:17

          I did what you wrote and still same problem. That wasn't my intention to use 5 Qt kits, i am new to Qt so i still learning how to use this.

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 30 Dec 2017, 17:27 last edited by
          #4

          @NoName97
          Just tried your project and it just works.
          Did you delete the build folder as Mr @Chris-Kawa suggests?
          alt text

          1 Reply Last reply
          2
          • N Offline
            N Offline
            NoName97
            wrote on 30 Dec 2017, 17:30 last edited by
            #5

            yup i deleted them and still same problem :(

            M 1 Reply Last reply 30 Dec 2017, 17:32
            0
            • N NoName97
              30 Dec 2017, 17:30

              yup i deleted them and still same problem :(

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 30 Dec 2017, 17:32 last edited by mrjj
              #6

              @NoName97
              And you also deleted the .user file and re-selected ONE compiler/kit ?
              The code works here so its not the code :)

              1 Reply Last reply
              0
              • N Offline
                N Offline
                NoName97
                wrote on 30 Dec 2017, 17:49 last edited by
                #7

                yup i did that and still same problem :(

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 30 Dec 2017, 22:17 last edited by
                  #8

                  Hi,

                  In that case, did you check that you didn't modify your Qt installation somehow ?

                  Did you check your Kit ?

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

                  1 Reply Last reply
                  0
                  • N Offline
                    N Offline
                    NoName97
                    wrote on 31 Dec 2017, 12:22 last edited by
                    #9

                    I think i didn't modify anything. I reistalled it and did everything same like the first time. Everything looks fine. Dunno what's is going on.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 31 Dec 2017, 19:14 last edited by
                      #10

                      Did you have any system update happening in between ?

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

                      1 Reply Last reply
                      0

                      9/10

                      31 Dec 2017, 12:22

                      • Login

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