Results 1 to 3 of 3

Thread: Qt git problem, QObject: no such file or directory

  1. #1
    Join Date
    Jul 2009
    Posts
    26
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Windows

    Default Qt git problem, QObject: no such file or directory

    Hi all,

    I have a strange problem on my computer. I am using qt 4.7) on linux and windows. I wrote some project, that works fine in Linux and commited it on a remote server. Then I switched to Windows and dowloaded the repository. All owrks fine (compilation and execution), unless I change anything in any file. I mean, when I change (add remove some space, character, comment) a file, and try to compile for the second time, I get the error:
    "error: QObject: No such file or directory "
    In git (tortoise) I have a settings so that appropariate new lines are taken for each OS.

    Does anzone of Zou had similar issues, or someone has idea ho to fix it. I need it reallz badlz. It could be due ot encoding, however ccreator has possibilitz to choose bestween text+encoding stzle, however after plazing aroung , I managed to get nothing.

    Will appreciate anz help,
    Kryzsytof Wielgo

    Thank Zou for anz help,
    all the best,

  2. #2
    Join Date
    Jul 2009
    Posts
    26
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Windows

    Default Re: Qt git problem, QObject: no such file or directory

    When everything is fine (no changes have been done), I get g++ with following parameters
    Qt Code:
    1. mingw32-make[1]: Entering directory `C:/repo/SomeClass'
    2. C:/Qt/2010.02.1/mingw/bin/mingw32-make -f Makefile.Release
    3. mingw32-make[2]: Entering directory `C:/repo/SomeClass'
    4. c:\Qt\2010.02.1\qt\bin\uic.exe someclass.ui -o ui_someclass.h
    5. g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DUTILS_LIBRARY -DQT_DLL -DQT_NO_DEBUG -DQT_TESTLIB_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"c:\Qt\2010.02.1\qt\include\QtCore" -I"c:\Qt\2010.02.1\qt\include\QtNetwork" -I"c:\Qt\2010.02.1\qt\include\QtGui" -I"c:\Qt\2010.02.1\qt\include\QtXml" -I"c:\Qt\2010.02.1\qt\include\QtTest" -I"c:\Qt\2010.02.1\qt\include" -I"c:\Qt\2010.02.1\qt\include\ActiveQt" -I"release" -I"." -I"c:\Qt\2010.02.1\qt\mkspecs\win32-g++" -o release\someclass.o someclass.cpp
    To copy to clipboard, switch view to plain text mode 

    In case there has been a change, I get:

    Qt Code:
    1. mingw32-make[1]: Entering directory `C:/repo/SomeClass'
    2. C:/Qt/2010.02.1/mingw/bin/mingw32-make -f Makefile.Release
    3. mingw32-make[2]: Entering directory `C:/repo/Project'
    4. g++ -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DGROUPADDRESSMODEL_LIBRARY -DQT_DLL -DQT_NO_DEBUG -DQT_TESTLIB_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT someclass.cpp -o SomeClass
    To copy to clipboard, switch view to plain text mode 

    So there is no include path specified for g++ arguments, although in Makefile.Release it is. There is include path, as well as some ui forms parameters for ui.exe program.

    Anyone knows why compiler omits these information, please?

    Thank You.

  3. #3
    Join Date
    Jul 2009
    Posts
    26
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Windows

    Default Re: Qt git problem, QObject: no such file or directory

    I think I got the solution and it was elswhere. The problem is to include some *.h files (e.g. file.h) we use #include <File>, where file File has #include "<path>/file.h" directive. On Unix this is not an issue, however on windows it is when the file File has the same name as on of the classes being compiled. It gets an error, as stated before when someone changes a file having File class. Then, when I do anything to File file (insert/remove) new line, compilation goes well.

    But this is cumbersome, I would have to insert nl everytime changes to File class are done. So the easiest way is to change #include <File> into #include <MyFile> and a file accordingly.

    Hopefully this helps some time, someone. I really ate my teeth on it and badaly needed a help.

    Regards,
    Krzysztof Wielgo.

Similar Threads

  1. Replies: 4
    Last Post: 9th May 2010, 16:18
  2. QMenu: No such file or directory
    By FinderCheng in forum Qt Programming
    Replies: 1
    Last Post: 4th May 2010, 11:02
  3. Replies: 2
    Last Post: 9th March 2010, 05:21
  4. Replies: 10
    Last Post: 15th June 2009, 19:44
  5. QApplication: No such file or directory
    By panos in forum Newbie
    Replies: 10
    Last Post: 27th August 2007, 11:08

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.