【发布时间】:2016-11-13 05:58:08
【问题描述】:
如何在 Ubuntu 上构建 Qt 5.7.0 以交叉编译到 Windows?
我有这个错误:
In file included from qt-everywhere-opensource-src-5.7.0/qtbase/include/QtCore/qt_windows.h:1:0,
from main.cpp:33:
qt-everywhere-opensource-src-5.7.0/qtbase/include/QtCore/../../src/corelib/global/qt_windows.h:61:21: fatal error: windows.h: No such file or directory
我的配置选项:
./configure -opensource -c++std c++11 -xplatform win32-g++ -device-option CROSS_COMPILE=i686-w64-mingw32- -device-option PKG_CONFIG=i686-w64-mingw32-pkg-config -force-pkg-config -prefix /opt/qt/qt-5.7.0-win32 -nomake examples
windows.h 有路径:/usr/i686-w64-mingw32/include/windows.h
注意:我不想使用 MXE。
【问题讨论】:
标签: c++ linux qt5 cross-compiling