Results 1 to 4 of 4

Thread: Cross compiling problem from Linux to Windows

  1. #1
    Join Date
    Apr 2017
    Posts
    55
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Cross compiling problem from Linux to Windows

    I am on Windows 10, I have visual studio 10 installed, QT4.8.5, Creator 2.8.1

    I developed an application that compiles and runs on Linux, RHEL 6.7, QT4.8.5, creator 2.8.1

    Getting compiler errors complaining about c/c++ header files missing.
    termio.h
    I commented that out and it complained about unistd.h
    commented that out and ...... well the compiler can display that many errors.

    With my windows configuration, is there an entry in my .pro file that needs to point to where these header libraries reside? and if so where do I find the files.

    Thanks
    emp1953

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Cross compiling problem from Linux to Windows

    On Windows there really is no direct equivalent to the termios.h header and its friends. Yuou have to use native Windows API and conditional compilation.

  3. #3
    Join Date
    Apr 2017
    Posts
    55
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Cross compiling problem from Linux to Windows

    Is there anyplace on this forum you could point me to that has examples of the conditional compilation into Windows API's that you are talking about.

  4. #4
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Cross compiling problem from Linux to Windows

    In Qt there are defined constants indicating the target platform, for Windows this is Q_OS_WIN.
    Look in Qt examples.

Similar Threads

  1. QT : Cross-compiling on WINDOWS to run at LINUX
    By andre_teprom in forum Qt Tools
    Replies: 5
    Last Post: 18th August 2013, 16:57
  2. cross compiling qt (linux/mingw -> windows): various undefined references
    By kaesekuchen in forum Installation and Deployment
    Replies: 0
    Last Post: 20th October 2012, 16:27
  3. Replies: 5
    Last Post: 28th February 2011, 23:37
  4. Replies: 3
    Last Post: 18th December 2010, 18:22
  5. Cross-Compiling Linux to Windows
    By xgoan in forum Qt Programming
    Replies: 10
    Last Post: 5th July 2007, 21:44

Tags for this Thread

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.