You are not logged in.

curtman

Unregistered

1

Friday, June 25th 2004, 8:47pm

compiling for other platforms

I have looked at other posting on this and other sites, but I have not been able to find a straight answer on this question.
I am using linux and would like to compile my project so it can be run on windows (ie create a .exe file). What are the exact steps to achieve this goal?

I have tried this...
[mayercj@localhost testApp]$ qmake -o Makefile -win32 test.pro
[mayercj@localhost testApp]$ make
make: *** No rule to make target `\home\mayercj\testApp\test.pro', needed by `\home\mayercj\testApp\Makefile'. Stop.
[mayercj@localhost testApp]$

I have also tried placing all of the project files onto a windows machine with an evaluation version of QT and compiling the project there, the application opens, but there are problems:
It cannot be closed
Dialogs from the menubar will not display
The project file will not open in designer b/c error:
No import filter is available

Thanks a whole bunch.
Curt

djanubis

Professional

  • "djanubis" is male

Posts: 1,370

Location: Moulins France

Occupation: Software ingeneering

  • Send private message

2

Friday, June 25th 2004, 11:18pm

RE: compiling for other platforms

Well, you're talking about cross-compiling. Cross compiling needs to prepare a cross compilation environment. Using qmake under linux to generate a win32 app will result on a win32 makefile generated. But when compiling, you miss all win32 environment.

The problems you meet when trying to compile in Windows may come from multiple reasons, the first being using non portable functions. But from what you you tell, might simply be you have a recent (3.2.x) version on Linux and an older version in Windows.
To really trace your problem, relative versions and .pro file could help.
Never patch not working code. Rewrite it !
Never patch badly designed classes. Recreate them cleanly.
(Excerpts from Computing Bible)

Home of the Lab project