My Qt c++ cross platform game work with windows but when it comes to the Linux there is an error “
Windows.h no such a file or dictionary in
How would you expect
windows.h to exist on a nom-Windows OS? On Linux you’re supposed to have
qt.h or so (and change those library function calls to Qt ones, instead of WinAPI).
windows.h is available only on Windows XP or newer (and Windows 2000 Professional). You can only choose one option: cross-platform or Windows.
I also doubt your program is right, since
main.ccp is not a valid name for a C++ source file.
You only need windows.h on Windows-Platforms. So my best advice for you is to use this:
This will include windows.h only if you are on Windows.