Results 1 to 5 of 5

Thread: Replacing windows specific header files in Qt app while porting to linux

  1. #1
    Join Date
    Feb 2010
    Posts
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default Replacing windows specific header files in Qt app while porting to linux

    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

  2. #2
    Join Date
    Jan 2009
    Location
    Russia
    Posts
    309
    Thanks
    2
    Thanked 43 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Replacing windows specific header files in Qt app while porting to linux

    Use pimpl and/or disable unnecessary headers in the *. pro file. See also the source itself Qt4.

  3. #3
    Join Date
    Jan 2010
    Posts
    73
    Thanks
    6
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Replacing windows specific header files in Qt app while porting to linux

    Are you able to use QT specific types rather than DWORD (qint32, for example).

  4. #4
    Join Date
    Feb 2010
    Posts
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Replacing windows specific header files in Qt app while porting to linux

    yaa, i am able to use data types declared in QtGlobal .

  5. #5
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Replacing windows specific header files in Qt app while porting to linux

    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.
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

Similar Threads

  1. Linux to Windows Porting
    By qtprogrammer12345 in forum Qt Tools
    Replies: 1
    Last Post: 23rd May 2008, 07:28
  2. linux to windows porting issues
    By qtprogrammer12345 in forum Qt Programming
    Replies: 1
    Last Post: 23rd May 2008, 06:45
  3. Porting Qt Application from Windows to Linux
    By rajeshs in forum Qt Programming
    Replies: 7
    Last Post: 12th July 2007, 13:30
  4. Porting Qt application on windows from linux
    By safknw in forum Qt Programming
    Replies: 13
    Last Post: 22nd May 2006, 13:11
  5. Porting Qt3 linux app to windows qt4
    By Philip_Anselmo in forum Qt Programming
    Replies: 7
    Last Post: 15th May 2006, 18:44

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.