[SOLVED] Qt 4.7.4 with MSVC2010 include file: '../../src/corelib/global/qconfig.h': No such file or directory
-
Hi everyone,
I just downloaded Qt 4.7.4 an decided to give it a try. I already have installed QtCreator 2.3.0 and have a my own build of 4.7.3 already.
The build on 4.7.3 works as expected and building the helpers in QtCreator 2.3.0 was as smooth as it could be.
But after building Qt 4.7.4 exactly the same way I build 4.7.3, which as I said works perfectly, I got an error building the helpers that says " include file: '../../src/corelib/global/qconfig.h': No such file or directory", I looked in my Qt 4.7.4 build, that didn't break in any way when building, and it was actually missing! the building process didn't generate the qconfig.h file.
Does anyone know if there are any known issues in building 4.7.4? Here's my configure command, it's exactly the same one I used for building Qt 4.7.3 which works great and build the helpers with no problems whatsoever.@
configure -platform win32-msvc2010 -debug-and-release -opensource -mp -plugin-sql-sqlite -qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -plugin-manifests -qmake -phonon -multimedia -webkit -script -scripttools -declarative -declarative-debug -arch windows -qt-style-windows -qt-style-windowsxp -qt-style-windowsvista -qt-style-plastique -qt-style-cleanlooks -qt-style-motif -qt-style-cde -no-qt3support -openssl -I C:\OpenSSL-Win32\include -L C:\OpenSSL-Win32\lib\VC
@
@
nmake
nmake clean
nmake confclean
@I have an intel Core i5 laptop with 6GB of RAM, windows 7 x64 and MSVC2010 building with the x86 compilers, I don't use x64 with Qt yet as it gave me some build issues.
-
Did you do a in-source or a shadow build? Did you run "make install"?
MSVC2010 for 64bit does indeed have some trouble with Qt: You need a hotfix for the compiler to make it work. For me it does build even without that hotfix, but the generated code is wrong and causes crashes:-(
-
uhm... not really... for building Qt since 4.7.x came out, I always run the four commands I mentioned before, in that order from the MSVC2010 command prompt, to build Qt.
Any recommendations so that 4.7.4 can build correctly? what am I doing wrong and how should I be doing it?
-
I have built Qt 4.7.4 with Visual Studio and similar configuration (win32-msvc2010) successfully. Many of the packages you used, I did not use. Another difference is that I used Win Xp instead of Win7.
Maybe try a minimal configuration, without examples, demos and tutorials?
What caused me headaches was the -prefix option (unsolved problems with that) and the running Virus Scanner (wich read-locked dlls, so the manifest could not be merged).
Have you set the paths correctly?
This is the procedure I used. Maybe that in itself can be of help for comparison to you.
The aforementioned file ‘../../src/corelib/global/qconfig.h’ exists in my src folder and it was packaged with the source files and then modified later.set QTDIR environment variable
add %QTDIR%\bin to PATHWithin Visual Studio Prof. Prompt Tool:
@configure.exe -debug-and-release -platform win32-msvc2010 -no-3dnow -no-phonon -no-phonon-backend -no-script -no-scripttools -no-qt3support -no-multimedia -no-webkit -arch windows -no-style-windowsvista -no-style-plastique -no-style-cleanlooks -no-style-motif -no-style-cde -no-style-windowsce -no-style-windowsmobile -no-style-s60 -no-opengl -mp@
@nmake@
-
densewater: I guess your environment is really different from mine, XP (guessing x86) instead of win7 x64, and you don't use a lot of stuff I do use like script tools, no webkit, no multimedia, no opengl and no database plugins.
I do have my QTDIR but that doesn't influence much in the build, though I always set it "just in case".
So, still, is there a way to build 4.7.4 with no problems with my specs and configuration? what has changed that I'm able to build with other 4.7.x versions but not this one?Tobias: the same thing happens to me with x64! it sucks right? it builds and all, but the generated code just doesn't work and it takes a while to figure that out.
And that install thing, I don't use it, any recommendations so that 4.7.4 builds ok? any special stuff you've done to your environment?
-
I haven't been able to find a solution for this, my build still doesn't work as it should.
Does anyone knows what's going on?
-
I have experienced the same problem on my Win 7 x86 with Visual Studio 2008, but actually it doesn't seem to be related to the OS/hw/settings in any manner.
The issue is in the generated makefile:
@
confclean: clean
-$(DEL_FILE) src\corelib\global\qconfig.h
-$(DEL_FILE) src\corelib\global\qconfig.cpp
-$(DEL_FILE) mkspecs\qconfig.pri
-$(DEL_FILE) .qmake.cache
(cd qmake && $(MAKE) distclean)
@Looking closer to lines 2 and 3 we see that confclean is actually deleting this qconfig.h file by intent, while in the Qt 4.7.3 it is deleting the same files, but from the different directory named "core" instead of "corelib".
So just don't execute the nmake confclean after building this version of Qt.
-
BTW, in order to restore deleted files I had to reinstalled Qt package and rebuild it.
-
I didn't use the install package, I get the zip and build it by myself.
And yes, it has some issues with the nmake confclean because it deletes my generated .h files.
So for the moment I won't do the confclean with 4.7.4 even though I hate having garbage files. -
confclean doesn't make much more cleanup than simple clean. Take a look at it definition, it just deletes couple more files additionally to clean and performs a distclean in the qmake folder.
You can either do this steps manually (nmake clean, cd qmake, nmake distclean) or edit makefile which is located in the qt root folder and delete the following lines from it:
@
-$(DEL_FILE) src\corelib\global\qconfig.h
-$(DEL_FILE) src\corelib\global\qconfig.cpp
@
or just run nmake confclean and restore qconfig.h and qconfig.cpp files using the zip package you have :) -
I had the same problem with Qt 4.8.1 and the solution still works.
In order to restore the missing files all I had to do was repeat the configure step. I didn't have to do the build with nmake or jom.
If you want to do debugging you will also want to save src\winmain\vc100.pdb before doing any of nmake clean, nmake confclean, or nmake distclean.