PDA

View Full Version : Replacing windows specific header files in Qt app while porting to linux



payal
9th February 2010, 10:11
Hi all,

I have a Windows Qt app containing windows.h and winver.h header files,also data types such as DWORD ,dwHandle etc.While compiling it in Linux ,its giving errors..So how can i get rid of these errors........

Installing Winelib wil solve the issues,by providing windows environment?Could anyone plz help me in this regard?

Regards,
Payal

kuzulis
9th February 2010, 10:31
Use pimpl and/or disable unnecessary headers in the *. pro file. See also the source itself Qt4.

pitonyak
9th February 2010, 19:12
Are you able to use QT specific types rather than DWORD (qint32, for example).

payal
10th February 2010, 07:01
yaa, i am able to use data types declared in QtGlobal .

faldzip
10th February 2010, 07:47
The best way is to rewrite your Windows specific part of code in a platform independent way. If your code is using WinAPI intensively then compile your app under windows and run it using Wine on linux.