PDA

View Full Version : What to install??? (QT+MinGW-w64 in Win7)



QTapprentice
10th December 2015, 12:11
Hi,

First of all, excuse my english and also if this has been asked, but i havent found it, or the answers that i found are like Obfuscated C to me...


Scenario: I want to port a C/C++/QT linux program to Windows7 64bits.

Objective: install QT/QTCreator/Mingw-w64 to star working in porting the program.


I read the faq, spent four days reading and searching through the web and I cant found what i will consider a reasonable solution. The more i read the less i understand...

The most readible guide i founded is the one at http://wiki.qt.io/MinGW-64-bit and this are 13 pages of instructions telling me to build QT, modify PATHs, installing several programs before (Perl, python, ...), with broken links in the document and installers without any kind of instructions (not even a readme file)... and I think my head is gonna explode...

I was expecting downloading a couple of binaries with some clear installing instructions, running them and done, ready to star working, but this is a nightmare....


Any kind of help would be greatly appreciated,

ars
10th December 2015, 21:02
Hello,

for porting your program to Windows 7 64bit operating system you need not build your program as a 64 bit application. Depending on the memory requirements of your application you could also compile it as a 32 bit application and still run it on your 64 bit Windows 7. In case your application does not require 64 bit code, download the prebuilt Qt5.x with MinGW. Then you can focus on porting your application to Windows.

In case your application requires 64 bit code (e.g. your application has high memory demands) then you have the following options:
1. Use Microsoft 64 bit compiler and download the prebuilt Qt5.x for Microsoft compiler.
2. Search the web for prebuilt Qt64 development environment. I have a link here (never used the environment), but it seems to be down (http://www.tver-soft.org/qt64). If you find something, use the same compiler they have used for building the libraries
3. You use MinGW64. In this case you have to compile Qt from the sources and this is really not a straight forward thing to do.
4. Think about cross-compiling for Windows 7 on Linux. All modern linux distributions provide cross compilers based on MinGW (32 and 64 bits) plus the corresponding Qt libraries. I have done this a year ago and it worked like a charm. You may even run the Linux environment in a virtual machine on your Windows PC.

Best regards
ars

QTapprentice
11th December 2015, 13:13
Thanks for the answers ars,



1. Use Microsoft 64 bit compiler and download the prebuilt Qt5.x for Microsoft compiler.

The 64bit is a prerequisite, I can't fall back to 32 bits as much as i would like to...

And I cant use the MScompiler, there is a lot of Linux especific code I will rather not have to recode, as it will be a LOT of work to translate to the Windows world.



2. Search the web for prebuilt Qt64 development environment. I have a link here (never used the environment), but it seems to be down (http://www.tver-soft.org/qt64). If you find something, use the same compiler they have used for building the libraries

It seems to be the holy grail, no luck with this...



3. You use MinGW64. In this case you have to compile Qt from the sources and this is really not a straight forward thing to do.

I'am actually following this path, got over a lot of problems with the instructions indicated in my original post, (errors in the paths, wrong options in the instructions, scripts failling in the execution...), I was able to solve some of the errors, no luck with others, so right now, I'm still trying to make it work...



4. Think about cross-compiling for Windows 7 on Linux. All modern linux distributions provide cross compilers based on MinGW (32 and 64 bits) plus the corresponding Qt libraries. I have done this a year ago and it worked like a charm. You may even run the Linux environment in a virtual machine on your Windows PC.


The program is very intensive (real time sound with very low latency, threads, etc...) and i would rather work in native mode, but i would keep this in mind as a last resort option.


Again, thanks for your time and your answers ars,

ars
11th December 2015, 19:35
Hello,


It seems to be the holy grail, no luck with this...I agree. The link I posted yesterday seems to be dead, so I did another search and came across http://www.drangon.org/mingw/. In the middle of the page you find the download of Qt 5.x development stuff (without compiler). Maybe you give this a try. I will try it myself on the weekend.

Best regards
ars

QTapprentice
15th December 2015, 09:55
Hi,

Ok, this are the results that i got:

- I follow up the instructions at http://wiki.qt.io/MinGW-64-bit, I was able to get through a lot of mispellings and errors, but get stuck in the ncurses compilation, I can't resolve it, so no luck this way...

- Tryed your last link, http://www.drangon.org/mingw/, but it is compiled for XP/2003 64 bits and "configure" fails to recognize the Win7, so also a dead end.

I will continue looking and if I get any good news i will post them here...

Ars, thanks again for your help.

QTapprentice
18th December 2015, 11:14
Ok,

It seems as i finally found a working solution.

Following this instructions https://wiki.qt.io/MSYS2 i finally have what seems to be a working 64 bit Qt Creator in Windows7 with MinGW64...

I still have to check that everything is ok and configure a lot of things, but at least i got a 64 bits Hello world.

By