【问题标题】:QT 5.x compilation of Windows software on LinuxQT 5.x 在 Linux 上编译 Windows 软件
【发布时间】:2018-05-13 08:15:49
【问题描述】:

我正在尝试使用 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: 目标“发布”的配方失败
make: *
[发布] 错误 2

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

一切都在 Ubuntu 上使用这个命令在一个 docker 容器内运行。

make -f Makefile.Release

【问题讨论】:

  • 注意名称中的斜线。

标签: c++ qt qt5


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-03-26
    • 2012-12-19
    • 1970-01-01
    • 2011-05-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多