Making the Qt .pro file cross platform - dank-devz/effective-octo-meme GitHub Wiki
Creating a Cross Platform Qt .pro file
Qt Manual Page reference the manual above but as a quick example:
CONFIG += qt debug
HEADERS += hello.h
SOURCES += hello.cpp
SOURCES += main.cpp
win32 {
SOURCES += hellowin.cpp
}
unix {
SOURCES += hellounix.cpp
}
Platform Dependant C++ code
Maybe nice if we end up having to use something platform specific within actual code (like timing). See links below but as a quick example...
#ifdef _SUNOS
//code
#elseif _LINUX
//code
#elseif _HPUX
//code
#elseif _WIN32
//code
#else
#error OS not supported
#endif