PDA

View Full Version : How can i know if my application compiled on Win 7 x32 SP1 would run on other Windows



code_err
25th February 2012, 23:07
As in title. Want to create multi-windows version app, but compiled only once. But how can i know if it would run for instance on Win XP SP1 x32, or Win XP x64 SP2 if i don't have them? It probably depends on in what architecture my libraries (like QT) was compiled, my OS architecture, compiler but anything else?
What should i do if i would like to have app working on Win 98 and compiled on Win 7?

ChrisW67
26th February 2012, 04:45
If you want a compile once run anywhere Windows application then:

You will have to build a 32-bit application. 64-bit applications will not run on 32-bit platforms but the 32-bit ones will run on 64-bit Windows.
Avoid using any Windows API code that is not available in Windows XP.
Avoid using any third party library that does not support Windows XP.


If you really want to inflict Windows 98 on yourself then you should look here:
http://stackoverflow.com/questions/2999095/compiling-qt-for-windows-98
It seems likely you will have to use a compiler that can target Win 98 and, of course, avoid any functionality that requires features of Windows 2000/XP or later.

code_err
26th February 2012, 14:47
Ok, thanks.
I have one more question. I can see on this page:http://developer.qt.nokia.com/doc/qt-4.8/supported-platforms.html
that there are three levels of Nokia support for Qt development. My question is, what do you think about creating commercial application on Windows with GCC/MinGW compiler. Is there a real risk of hidden errors? Do people make commercial soft with this combination?

ChrisW67
26th February 2012, 22:44
My question is, what do you think about creating commercial application on Windows with GCC/MinGW compiler. Is there a real risk of hidden errors?
There is always a risk that there will be errors in the compiler output. This is not unique to open source software. A bug in the compiler is only relevant if it affects the compilation or operation of your program. Failing to compile is failing safe (i.e. no adverse customer effect) and you hope your testing will detect operating errors. Compiler errors with adverse effects are generally quickly found and fixed because the tools are widely used.

Do people make commercial soft with this combination?
Yes, absolutely.

If you really want to use a Tier 1 supported compiler then the compiler in the free (as in no dollars) Windows SDK should do the trick.