首页 文章

QT 5.x在Linux上编译Windows软件

提问于
浏览
0

我正在尝试使用qt在linux上编译windows软件,但每次我尝试编译时都会收到以下错误:

i686-w64-mingw32.static-g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=gnu++11 -Wall -W -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I. -I/mxe/usr/i686-w64-mingw32.static/qt5/include -I/mxe/usr/i686-w64-mingw32.static/qt5/include/QtSvg -I/mxe/usr/i686-w64-mingw32.static/qt5/include/QtWidgets -I/mxe/usr/i686-w64-mingw32.static/qt5/include/QtGui -I/mxe/usr/i686-w64-mingw32.static/qt5/include/QtNetwork -I/mxe/usr/i686-w64-mingw32.static/qt5/include/QtCore -Irelease -I. -I/mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/win32-g++  -o release/inventoryview.o View/inventoryview.cpp

在View / inventoryview.cpp中包含的文件中:2:0:./ ui_inventoryview.h:21:50:致命错误:Widget \ Inventory \ inventoryplusbutton.h:没有此类文件或目录编译终止 . Makefile.Release:6009:目标'release / inventoryview.o'的配方失败make [1]:离开目录'/ builds / Skytwoo / qt-test / Synaps-Software'make [1]:* [release / inventoryview.o ]错误1 Makefile:36:目标'release'的配方失败make:* [release]错误2

我检查了多次,每个文件夹都存在 .

使用此命令在Docker容器内的所有内容都在Ubuntu上运行 .

make -f Makefile.Release

1 回答

  • 0

    正如BoBTFish所说,你的路径中不能有\(反斜杠) . 你在这里要做的是将 Widget\Inventory\inventoryplusbutton.h 改为 Widget/Inventory/inventoryplusbutton.h 并确保它存在 .

相关问题