Can anyone tell me how to build .app extension files through Qt Creator-SDK and MingW? GCC Compiler is also installed.
I have done is
qmake -spec macx-xcode project_name.pro
It created supporting files to create .app extension (when opened in Notepad).
Thank You.
I recommend CMake: it does what it says on the tin: cross-platform make. Integrates nicely with Qt (it's what KDE uses).
Related
Qt 5.11. Mac OS X.
I'm trying to write automatic build script for Jenkins. Target platform: Android armv7.
androiddeployqt says me that it cannot find ant in PATH.
Yes, I did not install Ant.
But, it works somehow with Qt Creator. Qt Creator can build APK. Why so? It uses the same androiddeployqt, doesn't?
Do I really need to install ant (while Qt Creator does not need it)?
Qt Creator uses undocumented --gradle option. Add it to your command.
Hello my problem is how to build qt application without need a msvcrt.dll
and builded a exe need msvcrt.dll how to fix? im trying build with /MT commandline argument but not working ineed make a full Standalone Qt application.
Thank you
The solution is to use ./configure -static -static-runtime for MSVC when building Qt. It will link the windows runtime libraries statically.
-static-runtime .... Statically link the C/C++ runtime library.
or you use MingW as your compiler. MingW will not have the typical windows runtime dependencies. There may be dependencies, but they are already available on every Windows system.
As far as I know -static-runtime is available somewhere from Qt 5.x
I'm attempting to use Qt creator to cross-compile a project, but have an issue matching the Qt version and my specified compiler toolchain.
I have created a Kit setting up a Device, selecting my toolchain as the compiler (GCC ARM Linux in this case), but I only have a locally installed system Qt (5.0.2 on Mint x86).
Qt Creator understandably tells me the compiler cannot produce code for the Qt version; all the guides I have found suggest using a Qt compiled for the target platform. This doesn't make sense though - it attempts to run qmake compiled for a different architecture and fails
How do I install or configure/compile a Qt version to work with the cross compiler? Maybe I can modify my existing one to understand this setup?
Thanks
This makes absolutely sense. The advice to use a Qt, which is compiled for your target platform is correct. But this does not mean that you use a Qt that was compiled natively on that target platform. You need to use a Qt, which was compiled with a special cross compiler on your host platform for your target platform. This way qmake and other build tools remain executable on your host, but create configurations for your target.
So, if you have a compiler, which can create ARM code, use it to build your Qt. Then you can create a kit in QtCreator out of this compiler/Qt pair.
Greenflow is right. I would like to add some information. I have cross compiled Qt 5.4.1 on Windows having an ARM Linux as target platform. You just need to configure the build properly. Here's what I did:
./configure -platform win32-g++ -xplatform linux-arm-gnueabihf-g++ .....
So Qt tools (qmake,moc,etc...) were built as Windows binaries and all the libraries were built as Linux binaries. Check for the available platforms in qtbase/mkspecs.
I'm a big fan of StackOverflow because you always have answers for problems, and now is my chance to get advance of it Ö!
I'm trying to use a library which I got in the Internet, its OZCollide. Its suppossed to be crossplatform as it says in its website "Cross-platform, works on Windows, Linux and Macintosh, in fact any platform supporting VisualStudio 6/7 or gcc"
I got all the .h and .cpp, compile them with MinGW as objects (.o) and then link them all using ar. But the problem is when I include and use the library on my project (QT & MinGW) it throws "undefined reference".
I thought the problem could be that library examples only uses Visual Studio, so the library coulnd't be compiled for MinGW, but the website tells other story.
Thanks for your time!
EDIT: Okay I have managed to compile it and use it moving to another computer and compiling makefile. The only one difference is that Computer A had Cygwing and MinGW installed (with Cygwin set up in Windows path) and Computer B only had MinGW.
So I guess the problem was Makefile calling for g++ and Cygwin g++ got called instead of MinGW g++??
If I'm right, whats the difference between Cygwin and MinGW?
if you have experience with CMake, create your own CMakeLists file and import/link this libraries against your project. In this way, you can create projects for MinGW/MSVC/Linux/etc.
Here you'll find a good start with CMake http://www.cmake.org/cmake-tutorial/
My laptop is 64-bits, so when I start to use Qt, I chose 64-bit QtCreator.
Now I'm facing a problem, I wish that the executable files I generated are runnnable on 32-bit linux system.
Can I set QtCreator to generate 32-bit executable files? So that I can decide I want to generate 32-bit ones or 64-bit ones.
I don't want to install another 32-bit QtCreator ><.
You will need to install a 32-bit Qt, at least. You shouldn't need to install a 32-bit Qt Creator, though.
Once you install a 32-bit Qt, you should be able to add that version to Qt Creator and have it work without much trouble. You may need to force Creator to use the linux-g++-32 mkspec while compiling. If you build the 32-bit Qt yourself, you can do this by configuring with -platform linux-g++-32. If you install it from a package, hopefully the package builder has already done this.
I've figure out how to generate 32-bit codes.
from the "project" tab in QtCreator:
Build Settings
Build Steps
QMake -> show detail
put following arguments in "Additional arguments":
-spec linux-g++-32 -r