PDA

View Full Version : Cross compiling problem from Linux to Windows



emp1953
10th August 2018, 18:10
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

Lesiok
10th August 2018, 18:24
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.

emp1953
10th August 2018, 18:44
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.

Lesiok
11th August 2018, 09:21
In Qt there are defined constants indicating the target platform, for Windows this is Q_OS_WIN.
Look in Qt examples.