[SOLVED] qt git problem, QObject: no such file or directory.
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
qt git problem, QObject: no such file or directory.
Sorry if someone thinks, this topic should be somewhere else. However, this is a linux application. Nevertheless issue concerns both linux and windows.
I have a strange problem on my computer. I am using qt 4.7 on linux (ubuntu lucid) and windows (XP, 7). 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 works fine (compilation and execution), unless I change anything in any file. I mean, when I change (add or remove some space, character, comment a line, whatever) a file, and try to compile for the second time, I get an 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.
Has anyone of You had similar issues, or someone has idea how to fix it. I need it really badly. It could be due to encoding, however qtcreator has possibility to choose between text-encoding styles, however after playing around , I managed to get nothing.
But maybe git only fixes the newlines after you check in the code, no? I don't remember if mingw tools want unix or DOS newlines; what editor are you using to change the file?
Thank You very much. 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.
Thank You very much. I really ate my teeth on it and bdaly needed a help.