Qt static compile cannot read path - c++

i use Qt5.6.0 msvc , and vs 2013, and install python-2.7.12 also, when I compile Qt to build static, i get this error,
Note: driver E not the main drive
Cannot read E:/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/mkspecs /win32-msvc20
13 /qmake.conf: The system cannot find the path specified.
Could not read qmake configuration file E:/Qt/qt-everywhere-opensource-src-5.6.0
/qtbase/mkspecs/win32-msvc2013 /qmake.conf.
Error processing project file: E:\Qt\qt-everywhere-opensource-src-5.6.0\qt.pro
Qmake failed, return code 3
this is the what i used in Developer Command Prompt for VS2013
- set QMAKESPEC=win32-msvc2013
- set QTDIR=E:\Qt\QT-EVE~1.0\qtbase
- set PATH=E:\Qt\QT-EVE~1.0\qtbase\bin;%PATH%
- set PYTHONPATH=%E:\Python27%;E:\Python27\Lib
- cd E:\Qt\qt-everywhere-opensource-src-5.6.0
- configure -static -platform win32-msvc2013 -nomake examples -nomake tests -mp

ok problem solved, Just add in Environment Variables shorted path for Qt
E:\Qt\QT-EVE~1.0\qtbase\bin;%PATH%;E:\Python27;E:\Python27\Lib

Related

Qt - Compilation Error: Couldn't change working directory

I am trying to compile oxideqt, a QML API for Chromium Embedded Framework (CEF), but I am experiencing an error:
11:13:58: Running steps for project oxideqt...
11:13:58: Configuration unchanged, skipping qmake step.
11:13:58: Starting: "C:\Qt\Qt5.1.1\Tools\QtCreator\bin\jom.exe"
cd qt\lib\ && ( if not exist Makefile C:\Qt\Qt5.1.1\5.1.1\msvc2010\bin\qmake.exe C:\Users\simon\Documents\oxide\qt\lib\lib.pro -spec win32-msvc2010 -o Makefile ) && C:\Qt\Qt5.1.1\Tools\QtCreator\bin\jom.exe -f Makefile
C:\Qt\Qt5.1.1\Tools\QtCreator\bin\jom.exe -f Makefile.Release
cd C:/Users/simon/Documents/oxide; ./build/gyp_oxide -IC:/Users/simon/Documents/oxide/qt/qt.gypi -Doxide_qt_libversion=0
Couldn't change working directory to C:/Users/simon/Documents/oxide; ./build/gyp_oxide -IC:/Users/simon/Documents/oxide/qt/qt.gypi -Doxide_qt_libversion=0.
jom: C:\Users\simon\Documents\build-oxideqt-Desktop_Qt_5_1_1_MSVC2010_32bit-Release\qt\lib\Makefile.Release [C:\Users\simon\Documents\oxide\Makefile.oxide] Error 1
jom: C:\Users\simon\Documents\build-oxideqt-Desktop_Qt_5_1_1_MSVC2010_32bit-Release\qt\lib\Makefile [release] Error 2
jom: C:\Users\simon\Documents\build-oxideqt-Desktop_Qt_5_1_1_MSVC2010_32bit-Release\Makefile [sub-qt-lib-lib-pro-make_first-ordered] Error 2
11:13:58: The process "C:\Qt\Qt5.1.1\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project oxideqt (kit: Desktop Qt 5.1.1 MSVC2010 32bit)
When executing step 'Make'
It looks like that it is doing a cd on C:/Users/simon/Documents/oxide; ./build/gyp_oxide -IC:/Users/simon/Documents/oxide/qt/qt.gypi -Doxide_qt_libversion=0, but I cannot find out which script is doing the cd.
The following are the associated .pro files:
oxideqt.pro (top level .pro)
TEMPLATE = subdirs
CONFIG += ordered
lib.file = qt/lib/lib.pro
SUBDIRS += lib
renderer.file = qt/renderer/renderer.pro
SUBDIRS += renderer
sandbox.file = qt/sandbox/sandbox.pro
SUBDIRS += sandbox
qmlplugin.file = qt/qmlplugin/qmlplugin.pro
SUBDIRS += qmlplugin
testutils.file = qt/tests/utils/testutils.pro
SUBDIRS += testutils
qmltests.file = qt/tests/qmltests/qmltests.pro
SUBDIRS += qmltests
QMAKE_CLEAN += -r \
$${OXIDE_SRC_ROOT}/Makefile.oxide \
`find $$OXIDE_SRC_ROOT -name \"*.target.oxide.mk\"` \
$$CHROMIUM_OUT_DIR
lib.pro
CONFIG += gyp disable_check
TARGET = oxide-qt
GYP_TYPE = lib
include($${OXIDE_QMAKE_PATH}/oxide_variables.pri)
GYP_LIBVERSION = $$OXIDE_QT_LIBVERSION
resources.path = $$LIBEXECDIR
resources.files = \
$${CHROMIUM_OUT_PLAT_DIR}/oxide.pak \
$${CHROMIUM_OUT_PLAT_DIR}/oxide_100_percent.pak
resources.CONFIG = no_check_exist
INSTALLS += resources
A possible reason and solution:
This looks like it is for sh, not for cmd.exe:
cd C:/Users/simon/Documents/oxide; ./build/gyp_oxide -IC:/Users/simon/Documents/oxide/qt/qt.gypi -Doxide_qt_libversion=0
If so, it may be due to faulty auto-detection of shell. A reason for that happening might be that there is sh.exe in the PATH. So, find out where it is, and either remove the folder from PATH or rename the file to sh_.exe or whatever.
To find it, this should find the file (a link) at the correct cmd.exe prompt for the build environment:
where sh
Note that if you have a lot of stuff installed, you may have several of them in your PATH, so after getting rid of first, check again... If still not solved, try removing bash from PATH too (though I have not seen that causing trouble). Also remember to restart the IDE or the command prompt if you edit system PATH, for the change to take effect. And then remember to re-run qmake.
It seems that http://bazaar.launchpad.net/~oxide-developers/oxide/oxide.trunk/view/head:/build/gyp_oxide is a python-script, which the make tries to start. Is python.exe in your PATH-variable?
Kim Kulling
I just looked over the configuration of the whole pro-files and found a lot of unix-specific paths like /usr/local. Is window as a build target at all supported?
As mentioned before the build script cannot work with cd ; command .
Maybe you can try to run it using cygwin?
Kim Kulling

wxWidgets-2.9.4\include and \lib\gcc_lib\mswu No such file or directory error on CodeBlocks

I'm trying to learn C++ programming with wxWidgets and CodeBlocks (with MinGW) and earlier today I succeeded in installing the software (after some trouble) to my Windows 7 computer with the guidance given to me in this post:
wxWidget 2.8.12 not working in Codeblocks
Later on the same day, I did the exact same steps on another Windows 7 machine and after creating a wxWidgets project and trying to compile and run it I got the following errors:
\wxWidgets-2.9.4\include: No such file or directory
\wxWidgets-2.9.4\lib\gcc_lib\mswu: No such file or directory
I have checked and these folders really do exist on those locations...so what seems to be the problem here again?...on the earlier post user asanth kumar guided me that if the steps given in the guide don't get the job done, then I'm missing an important compiler search path in my build options.
Ok, so what do I do? Where do I enter the search path? What is the search path, etc. I'm very new with wxWidgets and CodeBlocks so I don't know very much terminology. If anyone should know what to do, could you please give me like step by step instruction what to do e.g. like Click Project --> Build options --> ... and so on
I have used the latest CodeBlocks (12.11) and wxWidgets (2.9.4) installers
Thank you for any help :)
UPDATE:
here is the build log: (I'm using CodeBlocks 12.11 and wxWidgets 2.9.4)
-------------- Build: Debug in TEST (compiler: GNU GCC Compiler)---------------
windres.exe -I"C:\Users\Jonne\Omat ohjelmat\wxWidgets-2.9.4\include" -I"C:\Users\Jonne\Omat ohjelmat\wxWidgets-2.9.4\lib\gcc_lib\mswu" -J rc -O coff -i C:\Users\Jonne\DOCUME~1\CODEBL~1\TEST\resource.rc -o obj\Debug\resource.res
gcc: error: ohjelmat\wxWidgets-2.9.4\include: No such file or directory
gcc: error: ohjelmat\wxWidgets-2.9.4\lib\gcc_lib\mswu: No such file or directory
windres.exe: preprocessing failed.
Process terminated with status 1 (0 minutes, 0 seconds)
3 errors, 0 warnings (0 minutes, 0 seconds)
Here is also a picture where you can see Build options, global variables and build log on my CodeBlocks:
NOTICE FUTURE READERS: Install wxWidgets to a directory without whitespace in the path name. The problems in this post was because the directory path had spaces in it
When you create a wxWidgets project.Have you did this?
File->New->Project->wxWidgets Project->Click Go->Click on Next->click on the suitable wxWidgets 2...version->click Next->Give project Name->Click on Next->Click on Next
After that the Following below Screen comes in the Wizard. Give the wxWidgets Location(Path where You installed the wxWidgets 2.9.4)
After that click on Finish.
For Environment Variable Path Setting
Follow the Below Steps:
Right click on MyComputer->Click on Advanced Systems settings->click on Environment Variables->click on New->Give variable name=Path and variable value="C:\Program Files (x86)\CodeBlocks\MinGW\bin" -> click ok
`
Try The Following Steps.It will work.
Updates about Build settings:
I am having the same problem as this and I somehow solved my problem.
I transfer my wxWidget folder to another location path that don't have white space name on it's path. For example above, "C:\Users\Jonne*Omat ohjelmat*\wxWidgets-2.9.4\include"
the path has white space between Omat ohjelmat. Try transfering it where the path contains no white spaces. For me, I put it on C:\wxWidgets-3.1.2

Compiling source Qt 4.7.4 on windows 7 error qmake is not an internal or external command

Edit 2 -
I don't have the application file qmake in the /bin folder and this is the error I am getting.
Path environment variable : C:\development\referencebuilds\qt\4.7.4\qt-everywhere-opensource-src-4.7.4\bin\
Command Prompt - visual studio 2005
Source folder - C:\development\referencebuilds\qt\4.7.4\qt-everywhere-opensource-src-4.7.4
Steps -
Downloaded src
Extracted the files to folder – qt-everywhere-opensource-src-4.7.4(C:\development\referencebuilds\qt\4.7.4)
configure.exe -opensource -fast -no-accessibility -no-qt3support -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-webkit -no-scripttools -platform win32-msvc2005 -D “_BIND_TO_CURRENT_VCLIBS_VERSION=1”
4.nmake
The error I get is
Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation. All rights reserved.
C:\development\referencebuilds\qt\4.7.4\qt-everywhere-opensource-src-4.7
.4\bin\qmake C:/development/referencebuilds/qt/4.7.4/qt-everywhere-opensource-sr
c-4.7.4/\projects.pro -o Makefile -spec win32-msvc2005
'C:\development\referencebuilds\qt\4.7.4\qt-everywhere-opensource-src-4.7.4\bin\
qmake' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'C:\development\referencebuilds\qt\4.7.4\qt-everywher
e-opensource-src-4.7.4\bin\qmake' : return code '0x1'
Stop.
I know I dont have the app files for qmake and many other appfiles in my \bin folder. How do I get them?
Edit 1
Well, after trying out all the answers, the situation still remains the same. I think i should add more details to what I am doing.
I am copying bin files(.dll , Appplication, Application Extension, Incremental Linker File, Program Debug Database, ) from another machine and the version of Qt was 4.7.2
My questions are -
1. Do you see that as the cause for all the issues here? If yes, how do I get all the above files? If I just congigure as above and then run nmake I get
Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation. All rights reserved.
C:\development\referencebuilds\qt\4.7.4\bin\qmake
C:/development/referen cebuilds/qt/4.7.4/\projects.pro -o Makefile
-spec win32-msvc2008
'C:\development\referencebuilds\qt\4.7.4\bin\qmake' is not recognized
as an inte rnal or external command, operable program or batch file.
NMAKE : fatal error U1077:
'C:\development\referencebuilds\qt\4.7.4\bin\qmake' : return code
'0x1' Stop.
1, Downloaded the source file named
qt-everywhere-opensource-4.7.4 and saved it in folder c:\development\referencebuilds\qt\4.7.4\
2, uncompressed the zip file and the files extracted into folder
c:\development\referencebuilds\qt\4.7.4\qt-everywhere-opensource-4.7.4
3, Copied back all files from the folder
c:\development\referencebuilds\qt\4.7.4\qt-everywhere-opensource-4.7.4 to c:\development\referencebuilds\qt\4.7.4\
4, ran
configure.exe -opensource -fast -no-acce ssibility -no-qt3support
-no-multimedia -no-audio-backend -no-phonon -no-phonon- backend
-no-webkit -no-scripttools -platform win32-msvc2008 -D
"_BIND_TO_CURRENT
_VCLIBS_VERSION=1"
5, nmake and now I get the following errors.
C:\development\referencebuilds\qt\4.7.4\bin\qmake
C:/development/referen cebuilds/qt/4.7.4/\projects.pro -o Makefile
-spec win32-msvc2008 Could not find mkspecs for your
QMAKESPEC(win32-msvc2008) after trying:
C:\Qt\4.7.2\mkspecs Error processing project file:
C:/development/referencebuilds/qt/4.7.4//projects .pro NMAKE : fatal
error U1077: 'C:\development\referencebuilds\qt\4.7.4\bin\qmake.EX E'
: return code '0x3' Stop.
I have no clue as to why it is refering to C:\Qt\4.7.2\mkspecs . How do I get over this error? what is exactly happening. How do I prevent such issues in future?
Your install directory is:
c:\development\referencebuilds\qt\4.7.4\qt-everywhere-opensource-4.7.4
Let's call it $(QTDIR). Now:
Extend your PATH variable to include $(QTDIR)\bin
Specify the QMAKESPEC environment variable to be win32-msvc2005
Open a Visual Studio command prompt to get the Visual Studio environment variables
Run configure
Run nmake
This procedure usually gets the Qt build to work for me.
Make sure that you don't have any existing QT directories in your path before you call configure and nmake.
It looks like you have a previous version of Qt installed. "C:\Qt\4.7.2\". And it would seem you have it setup in your system variables. Look for a variable called QTDIR in your system environment variables. Which is why you are getting an error, basically your 4.7.2 Qt is trying to build the new version.
Two options:
Un-install your old Qt via add/remove software in the control panel.
or
Remove your QTDIR system variable for the time being (will require a re-login) so that when you try to build from source it will use the correct binaries from the source folder.
Then just follow this guide:
http://en.wikibooks.org/wiki/Opticks_Developer_Guide/Getting_Started/Building_Qt_From_Source

How to make Qt support HTML 5 database?

I am using Qt 4.7.1 and embedded a webview in my app. But I got the following error when trying to visit http://webkit.org/demos/sticky-notes/ to test the HTML 5 database feature
Failed to open the database on disk. This is probably because the version
was bad or there is not enough space left in this domain's quota
I compiled my static Qt library with the following command:
configure --prefix=/usr/local/qt-static-release-db --accessibility --multimedia
--audio-backend --svg --webkit --javascript-jit --script --scripttools
--declarative --release -nomake examples -nomake demos --static --openssl -I
/usr/local/ssl/include -L /usr/local/ssl/lib -confirm-license -sql-qsqlite
-sql-qmysql -sql-qodbc
Check QWebSettings documentation.
In particular, you have to use setAttribute to enable QWebSettings::OfflineStorageDatabaseEnabled and point out the local storage location using setOfflineStoragePath (e.g. QDesktopServices::DataLocation).
You might want to do it per-page, but as an example, doing it globally can be done using:
QWebSettings::globalSettings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true);
QWebSettings::globalSettings()->setOfflineStoragePath(QDesktopServices::storageLocation(QDesktopServices::DataLocation));

Slow building of a Symbian Qt Project in Qt Creator. Takes over 20 minutes

I'm trying to build a moderately sized Symbian Qt project (around 100 files) using the latest released Nokia Qt SDK (Qt 4.6.3 and Qt Mobility 1.0.2).
The build for the simulator finishes in under 3 minutes, but when I build for the device, the build takes well over 20 minutes! I can forget trying to debug on the device. It is very frustrating!
My machine specs are the following:
Windows 7 32-bit
3.24GB RAM
Intel Core 2 Duo 1.86GHz
The compiler has been stuck here for over 10 minutes:
Running build steps for project AppName...
Starting: "c:/nokiaqtsdk/symbian/sdk/bin/qmake.exe" C:/QtProjects/AppName/AppName.pro -r -spec symbian-abld -after OBJECTS_DIR=obj MOC_DIR=moc UI_DIR=ui RCC_DIR=rcc CONFIG+=release
The process "c:/nokiaqtsdk/symbian/sdk/bin/qmake.exe" exited normally.
Starting: "C:/NokiaQtSDK/Symbian/SDK/epoc32/tools/make.exe" release-gcce -w
C:\NokiaQtSDK\Symbian\SDK\epoc32\tools\make.exe: Entering directory `C:/QtProjects/AppName'
bldmake bldfiles
ABLD.BAT build gcce urel
make -r -f "\NokiaQtSDK\Symbian\SDK\EPOC32\BUILD\QtProjects\AppName\EXPORT.make" EXPORT VERBOSE=-s
make[1]: Entering directory `C:/QtProjects/AppName'
Nothing to do
make[1]: Leaving directory `C:/QtProjects/AppName'
make -r -f "\NokiaQtSDK\Symbian\SDK\EPOC32\BUILD\QtProjects\AppName\GCCE.make" MAKEFILE VERBOSE=-s
make[1]: Entering directory `C:/QtProjects/AppName'
make -s -C \QtProjects\AppName-f "MAKEFILE_0Xe001827C.MK" TO_ROOT=..\.. EPOCBLD=\NokiaQtSDK\Symbian\SDK\EPOC32\BUILD\MAKEFILE_0Xe001827C\GCCE TO_BLDINF=..\..\QtProjects\AppNamePLATFORM=GCCE MAKMAKE
perl -S makmake.pl -D \QtProjects\AppName\APPNAME_0Xe001827C GCCE
WARNING: \QtProjects\AppName\APPNAME_0Xe001827C .MMP(65) : SYSTEMINCLUDE path "\NokiaQtSDK\Symbian\SDK\epoc32\include\osextensions\stdapis\" not found
WARNING: \QtProjects\AppName\APPNAME_0Xe001827C .MMP(66) : SYSTEMINCLUDE path "\NokiaQtSDK\Symbian\SDK\epoc32\include\osextensions\stdapis\sys\" not found
WARNING: \QtProjects\AppName\APPNAME_0Xe001827C .MMP(69) : SYSTEMINCLUDE path "\NokiaQtSDK\Symbian\SDK\epoc32\include\oem\" not found
WARNING: \QtProjects\AppName\APPNAME_0Xe001827C .MMP(72) : SYSTEMINCLUDE path "\NokiaQtSDK\Symbian\SDK\epoc32\include\osextensions\" not found
WARNING: \QtProjects\AppName\APPNAME_0Xe001827C .MMP(73) : SYSTEMINCLUDE path "\NokiaQtSDK\Symbian\SDK\epoc32\include\domain\osextensions\" not found
WARNING: \QtProjects\AppName\APPNAME_0Xe001827C .MMP(74) : SYSTEMINCLUDE path "\NokiaQtSDK\Symbian\SDK\epoc32\include\domain\osextensions\loc\" not found
WARNING: \QtProjects\AppName\APPNAME_0Xe001827C .MMP(76) : SYSTEMINCLUDE path "\NokiaQtSDK\Symbian\SDK\epoc32\include\domain\osextensions\loc\sc\" not found
WARNING: \QtProjects\AppName\APPNAME_0Xe001827C .MMP(77) : SYSTEMINCLUDE path "\NokiaQtSDK\Symbian\SDK\epoc32\include\domain\middleware\loc\sc\" not found
WARNING: \QtProjects\AppName\APPNAME_0Xe001827C .MMP(82) : SYSTEMINCLUDE path "\NokiaQtSDK\Symbian\SDK\epoc32\include\osextensions\stdapis\stlport\" not found
MMPFILE "\QtProjects\AppName\APPNAME_0Xe001827C .MMP"
I solved the slow compilation problem as indicated by this thread
http://discussion.forum.nokia.com/forum/showthread.php?196650-Selective-compiling&p=720040&viewfull=1#post720040
I added
SYMBIANBUILD_DEPENDENCYOFF = 1
to the project environment variables (or it could be added to Windows environment variables), and the project compilation was back to speed again.
The solution to set the environment variable 'SYMBIANBUILD_DEPENDENCYOFF = 1' as mentioned above also works for us and can result in much quicker Target (GCCE) build times.
However, be aware that you may often need to perform a full (cleaned) re-build of the source if you have modified header files, and specifically added/removed functions for classes and therefore amended the class interface. This is because using this environment variable prevents the Symbian build tools from scanning your include files for changes.
Manually deleting the relevant *.o object files from your QTSDK\Symbian\SDK\epoc32\BUILD_yourfolder_ is a way to prevent the need for a full rebuild but also ensure that affected code is rebuilt.
I believe the slow speed of the Symbian GCCE builds is due to the legacy ABLD build tools, which should be replaced by the Symbian Build System (SBS v2) soon.
I've had trouble with very slow builds due to ZoneAlarm - switching it off resulting in builds 10x quicker... Worth a try if you have an OS firewall installed.
So cool page, the slow building speed in qt creator make me very very very frustrating, I nearly give up the Qt 4.6.3 and 4.7.3, after add the system variable 'SYMBIANBUILD_DEPENDENCYOFF = 1', it is really amazing, speed back, So thanks!
By the way, there is no speed problem in qt 4.7.4 and the compiler use the sbs not the perl any more.