Qt installation error - c++

i got an error when am trying to configure Qt.
Erro :
execute: File or path is not found (nmake)
execute: File or path is not found (nmake)
Cleaning qmake failed, return code -1
// installion files.
InterBase...............no
Sources are in..............E:\xampp\Qt\4.6
Build is done in............E:\xampp\Qt\4.6
Install prefix..............E:\xampp\Qt\4.6
Headers installed to........E:\xampp\Qt\4.6\include
Libraries installed to......E:\xampp\Qt\4.6\lib
Plugins installed to........E:\xampp\Qt\4.6\plugins
Binaries installed to.......E:\xampp\Qt\4.6\bin
Docs installed to...........E:\xampp\Qt\4.6\doc
Data installed to...........E:\xampp\Qt\4.6
Translations installed to...E:\xampp\Qt\4.6\translations
Examples installed to.......E:\xampp\Qt\4.6\examples
Demos installed to..........E:\xampp\Qt\4.6\demos
Creating qmake...
execute: File or path is not found (nmake)
execute: File or path is not found (nmake)
Cleaning qmake failed, return code -1
E:\xampp\Qt\4.6>

If you are trying to build Qt with a Visual Studio enviroment, you have to make sure that nmake and cl are in the PATH.
The easiest way to do that is to simply use the Visual Studio Command Prompt (found e.g. in the start menu).

You need to change your path so that it leads to wherever nmake is.

Try adding the flag "-make nmake" to your configure command.

Related

`Could not find feature system-zlib` during building QT source code

I'm trying to build QT from source code in Windows.
I installed QT binary (5.12.8) to get qmake, the bin path is added to system environment.
I downloaded QT source code (qtbase only) tag v5.12.8 and unzip to d:\github\qtbase
I opened the vs native x64 cmd shell and run: qmake qtbase.pro
The output is like:
Support enabled for:
Using pkg-config ....................... no
udev ................................... no
Using system zlib ...................... no
.
.
.
Qt is now configured for building. Just run 'nmake'.
Once everything is built, you must run 'nmake install'.
Qt will be installed into 'C:\Qt\Qt5.12.8\5.12.8\msvc2017_64'.
then I run nmake but I had this error:
Project ERROR: Could not find feature system-zlib.
NMAKE : fatal error U1077: 'cd' : return code '0x3'
Stop.
From the config log above, system zlib is not used, I assume QT's internal zlib will be used.
I have checked my folder, \src\3rdparty\zlib\src is existed and zlib.h is there.
I'd like to know how to fix this error or disable zlib.
#AlanBirtles Thanks for the hint, I followed the official instructions and compiled again, it works.
In the official instruction, configure.bat is used instead of my direct use of qmake.
There is one more difference in my second try: I use the src code in C:\Qt\Qt5.12.8\5.12.8\Src, not the code from github in d:\github\qtbase.
The code in C:\Qt is downloaded during my installation of binary QT, because I checked the source code item in the installation.

how to compile Libsmscout Library on Windows?

While I try to Run CMake for the Library https://github.com/Framstag/libosmscout
I get an Error on CMake Line 250
create_private_config("${CMAKE_CURRENT_BINARY_DIR}/privateinclude/osmscout/private/Config.h" "OSMScout")
error: Unknown CMake command "create_private_config .
OS: Windows 10 ; IDE: Qt Creator
From browsing the repository, it appears the error is occurring in the libosmscout/libosmscout/CMakeLists.txt file at line 250. CMake defines this function in libosmscout/cmake/features.cmake, a file which is included from the top-level CMake file. Try running CMake using the commands below, ensuring CMake starts from the root directory of the repository (same directory containing the appveyor.yml file):
cd C:/path/to/your/repo_root
mkdir build
cd build
cmake ..
The appveyor.yml file has some example configurations (e.g. Visual Studio 2015, x64) that have been tested with this project.

Error opening terminal: unknown Qt Creator on MacOs 10.12.4

I have installed QtCreator (4.2.2) and cmake (3.8.1) through homebrew on Mac OS 10.12.4.
I am importing an existing CMake project but when QtCreator is running cmake, I encounter the following error:
Running "/usr/local/bin/ccmake /Users/matthieu/project/source '-GCodeBlocks - Unix Makefiles' -DCMAKE_CXX_COMPILER:STRING=/usr/bin/g++ -DCMAKE_C_COMPILER:STRING=/usr/bin/gcc '-DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}' -DQT_QMAKE_EXECUTABLE:STRING=" in /Users/matthieu/project/source/build-decaf-Desktop-Default.
Error opening terminal: unknown.
In QtCreator > Preferences > Environment > System, the terminal is set to:
/Applications/Qt\ Creator.app/Contents/MacOS/../Resources/scripts/openTerminal.command
My TERM env variable is set to xterm-256color. I have tried xterm-color as well but with no luck.
I start to run out of ideas if someone has any suggestions!
I suspect your Qt Creator build settings have been set up to point at ccmake instead of cmake as the CMake executable. Have a look in the Build & Run section under the CMake tab and see what executable has been set. The cmake executable is the command line tool that you want, ccmake is a curses-based UI front end to CMake meant for interactive editing of the CMake cache.
The TERM isn't being recognized. Try stepping down to something more common, like
TERM=xterm

CMake zlib Dependency Error on Windows

I'm trying to build OpenEXR 2.2 on Windows, but the instructions that came with the download aren't working as expected. The instructions for IlmBase worked, but once I get to the OpenEXR instructions, it fails because of zlib. The steps at this point are:
3. Go to http://www.zlib.net and download zlib
So I went to this website and in the section that starts with: The current release is publicly available here: I downloaded zlib source code, version 1.2.8, zipfile format...
Then, I moved on to the next step, which is where I get the error:
4. Launch a command window, navigate to the OpenEXR folder with
CMakeLists.txt, and type command:
setlocal
del /f CMakeCache.txt
cmake
-DZLIB_ROOT=<zlib location>
-DILMBASE_PACKAGE_PREFIX=<where you installed the ilmbase builds>
-DCMAKE_INSTALL_PREFIX=<where you want to instal the openexr builds>
-G "Visual Studio 10 Win64" ^
..\openexr
So here's the command I type:
cmake -DZLIB_ROOT=C:\Users\erik\Documents\zlib-1.2.8 -DILMBASE_PACKAGE_PREFIX=C:\Users\erik\Documents\ilmbase-2.2.0\bin -DCMAKE_INSTALL_PREFIX=C:\Users\erik\Documents\ilmbase-2.2.0\bin -G "Visual Studio 10 Win64" ^..\openexr-2.2.0
And here's the error I get:
Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.8")
First problem is, the instructions don't say anything about ZLIB_LIBRARY. Second is, the zlib download looks like it's all source code. No .lib or .dll files are involved.
You have downloaded only the source code. You need to compile it first. Or download the pre-compiled DLL: "zlib compiled DLL" from the zlib homepage.
ZLIB_LIBRARY will be derived from ZLIB_DIR, so this part is correct.

Static build in Qt on Windows Vista

I am currently running Windows Vista Home Premium, and I have developed an application with my friend using Qt Creator. We are now trying to deploy our application as just one executable, so we are trying to do a static build. We have added CONFIG += static in our .pro file.
We are using this documentation to help us:
http://doc.trolltech.com/4.1/deployment-windows.html
When I try to build QT, I use this command:
configure -static -platform win32-msvc
Then I get this error:
Creating qmake...
execute: File or path is not found (nmake)
execute: File or path is not found (nmake)
Cleaning qmake failed, return code -1
I think I have to add nmake to my PATH, but I can't find it on my computer. Any help would be greatly appreciated. Thank you.
You will find a batch file under the bin directory of your visual studio install called "vcvars32.bat". Run that from the command line before you try building QT. That should solve your problems.
Open Visual Studo 20xx Command Prompt and compile Qt inside it!
For instance, on VS2008 I also need to set QMAKESPEC before trying to configure Qt:
set QMAKESPEC=<QT_DIR>\mkspecs\win32-msvc2008