PDA

View Full Version : Qt Ming 64 bit



Pourya
14th April 2015, 12:11
Hi
I'm really newbie to Qt. I had three question:
1-What is the difference between MinGw and MVCS compilers? If I have a code written by MinGw can I debug it by MVCS compiler?
2-I wanted to use MinGw but my System is Win7 64bit. I can't find MinGw 64bit.
3-Should my version of qt and MinGw be the same as the one that the code I want to use is written with?

ars
14th April 2015, 21:32
1. MinGW is the port of Linux gcc for Windows. It's opensource. You cannot link C++ libraries created with msvc to mingw compiled sources (and vice versa). As I do not use msvc, I cannot say anything about debugging mingw binaries with msvc debugger.
2. You can use mingw 32 bit compiler on a Windows 64 bit system. When you want to use Qt, you can get a complete toolchain (Qt libraries and tools together with the compiler) precompiled and packed into an installer from the Qt download page. If you want to compile 64 bit programs with MinGW 64 bit, you have to build Qt from the sources. To go this way, first get MinGW64 bit compiler and tools (I use MinGW64 from TDM http://tdm-gcc.tdragon.net/. Next get the sources of Qt and all the libraries used by Qt and configure Qt according to your needs. There is a good tutorial on this in the Qt wiki http://wiki.qt.io/MinGW-64-bit. If you are new to Qt, I recommend using the 32 bit Qt+MinGW or alternatively use one of the msvc builds (32/64 bit) available from Qt download site.
3. I'm not sure if I got your question right. If you want to use (precompiled) C++ libraries in your project these libraries have to be binary compatible with the compiler you use. I recommend to build the libraries yourself with your compiler toolchain. Even if you use C++ libraries built with e.g. MinGW 4.9.2 32 bit, they may not be binary compatible to your compiler due to different exception handling mechanisms (sjlj vs. dw2) used by the compilers.

As a summary, if you want to use MinGW + Qt, start with the 32 bit toolchain provided by Qt and use QtCreator as an IDE.

Best regards
ars

Pourya
16th April 2015, 10:11
Thank you very much. I'll try as your instructions