Qt Creator not compiling Qt Examples for iOS - c++

I'm trying to compile one QT Example included in QT creator for iOS device. The example is stocqt and I have getting the following trace when I try to build:
error: can't exec '/Applications/Xcode' (No such file or directory)
I'm compiling using the following environment:
Yosemite (10.10.3)
XCode 6.4
Qt Creator 3.5.1
Qt 5.4.2
Target: iPad with iOS 7.1.1
My PATH in system environment is the following:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin
Any idea about why Qt Creator is not getting my XCode path or what's going on with it?
Of course, the project is configured for iOS and is using clang.

Related

Empty project creating by QT Creator + cmake doesn't work

I create empty C++ project in QT Creator using cmake. After some menus where I choose "cmake" as a building tool I see a project hierarchy:
- MyTestCMake2
- CMakeLists.txt
(New Project -> Non-Qt Project -> Plain C++ Application -> checked CMake for building system)
And that's all! It's strange but QTCreator opens main.cpp with some C++ code but QTCreator tells me that this file does not a part of my project. I try to add main.cpp manually to MyTestCMake2 project but I can't do it. It's disabled.
CMakeLists.txt content is:
cmake_minimum_required(VERSION 2.8)
project(MyTestCMake2)
add_executable(${PROJECT_NAME} "main.cpp")
I try to run cmake with: Build -> Run CMake but nothing happens. What's wrong? Why QTCreator doesn't work with CMake properly?
My env is:
cmake: 3.9.1
Qt Creator: 4.3.1 (Qt: 5.9.1)
Mac OS Sierra 10.12.5
SOLVED
I've upgraded Qt Creator to 4.4 and it worked out of the box! I did the same steps as before but now it works without any problems! What a magic.
I've upgraded Qt Creator to 4.4 and it worked out of the box! I did the same steps as before but now it works without any problems! What a magic.
Sometimes the mixed QT 5.x installation breaks the kits. Several kits starts to show a warning in the kit popup message balloon (Tools->Options->Kits->Kits: Auto-detected/Manual) about unsupported generator cmake server mode (cmake -E command line option).
Seems only behind the cmake server mode the Qt Creator can properly build the Projects pane.
The only way I could get it fixed is complete QT uninstall before install. Even the last QT 5.x minor version can break the kits (5.12.12 at the moment).

QT adding compiler

I have QT 5.3.1 for Android (Windows), downloaded from http://qt-project.org/downloads with minGW 4.8.
Now I want to use MinGW 4.9 compiler.
To do so, I download mingw-w64 build [i686, posix, dwarf], and install it to separate folder.
Then, in QT creator, I add compiler in the "Build&Run" options.
Now when I compile something with -std=c++1y flag, in release mode - my program crashes at once (even window does not appear), and in debug mode I get :
During startup program exited with code 0xc0000139
What I do wrong?
I use Qt build from qtx64. It is built using MinGW 4.9 and has dwarf,seh,sjlj builds for x86/x64.
To use it you can create Qt Creator kit with it. You can use Qt Creator from qt-project.org but It should be configured like this:
Configuration images

Qtcreator.exe missing from Qt 4.7.3

Hi I have recently downloaded qt 4.7.3 for windows qt-win-opensource-4.7.3-vs2008.exe from this Link , I was using Qt Creator 3.0.1 based on Qt 5.2.1 (MSVC 2010, 32 bit) till now , but I need to build my project in Qt 4.7.3 ...the problem is I couldn't find the Qtcreator.exe in the downloaded folder , it contains all the libraries and everything except the.exe file .Is there any solution to get the Qtcreator.exe file for Qt 4.7.3 or is there any way to configure it with my Qt creator 3.0.1?
Qt 4.7.3 is quite old, back at this time it was shipped in the Nokia SDK along with the Qt version.
There is no reason why you can't add Qt 4.7.3 as a Qt version in your existing copy of Qt Creator 3.0.1 you should only need 1 copy of Qt Creator on your machine.
In QtCreator go to Tools->Options->Build&Run->Qt Versions
Click the add button and navigate to qmake for Qt 4.7.3
This should have created a kit for 4.7.3
You should now be able to go back to the projects tab for your project add the Qt 4.7.3 kit and build your project with 4.7.3

The program has unexpectedly finished - QT creator

I am trying to use QT creator to develop GUI/Console applications using QT framework. I am using windows XP. I installed QT 4.8.3 and mingw. Both are installed without any error.
And then I installed QT creator.
QT Version: Qt 4.8.2 in PATH (4.8.2)
Mingw(manual)
Compiler path: C:\MinGW\bin\g++.exe
Debugger path: C:\MinGW\bin\gdb.exe
mkspec: win32-g++
EnvironmentVariables:
QTDIR, PATH, MinGW,
PATH includes 4.8.2\bin; mingw\bin
INCLUDE : 4.8.2\include
When i try to develop an application using qt creator, it has been built properly and binary is also generated without any error.
But when I try to run the application, It is crashed saying that
The program has unexpectedly finished.
C:\Qt\4.8.2\examples\widgets\analogclock-build-desktop-Qt_4_8_2_in_PATH__4_8_2__Debug\debug\analogclock.exe exited with code -1073741819
This crash came for example application provided by QT library( it is analog clock)
Please try to help me in this, Do I need to set any variables or other
Thank alot.
I had exactly the same problem and solved it yesterday.
If the output of g++ --version doesn't say something like 4.4, this is binary incompatibility. You'll have to get MinGW 4.4. It is included in QtSDK, or at least was.
Next, configure your QtCreator settings ("Build & Run > Toolchains").

Qt GUI application build settings in Qt Creator

While I develop a small GUI application using Qt Creator (MinGW in Windows), the compilation is successful, and the binary is generated. But application is not ran, it gets crashed.
Below is my configuration setup:
Qt Version: 4.8.2
MinGW: compilerpath: C:\MinGW\bin\g++ debugger: C:\MinGW\bin\gdb
If I don't use Qt classes (QApplication, QWidget or QString), it works fine. I mean if I use std lib functions, it works fine.
Can any one suggest please?
What is your g++ version? You need to use g++-4.4 with Qt binaries downloaded from their site.