关于 •
FAQ •
贡献者 •
晨读 •
Github •
新浪微博 •
Play •
免责声明 •
联系我们 •
捐赠 •
酷站 •
Feed订阅 •
243121 人在线
最高记录 5390
©2013-2025 studygolang.com Go语言中文网,中国 Golang 社区,致力于构建完善的 Golang 中文社区,Go语言爱好者的学习家园。
Powered by
StudyGolang(Golang + MySQL) • · CDN 采用
七牛云
VERSION: V4.0.0 · 40.387151ms · 为了更好的体验,本站推荐使用 Chrome 或 Firefox 浏览器
京ICP备14030343号-1
楼上是界面的截图,不晓得为什么没有显示出来o(╯□╰)o
这界面是 Go + QT 写的?很酷……
@channel 是的,欢迎试用
一直是这个错误啊 ..\github.com\therecipe\qt\core\core.cpp:9:30: fatal error: QAbstractAnimation: No such file or directory
手动修改core.cpp的头文件路径
环境变量都加了啊 QT_VERSION | 5.8.0 | string | can also be set by using the
-qt_version
flag | | QT_DIR | $HOME/Qt5.8.0 or C:\Qt\Qt5.8.0 | string | can also be set by using the-qt_dir
flag | | QT_STUB | false | bool | is set totrue
during the minimal setup | | QT_DEBUG | false | bool | set totrue
if you want to print function names at runtime | | QT_QMAKE_DIR 如core.cpp 加绝对目录 C:..\include\QtCore 后 QT本身头文件 包含的 QtCore/xx 又找不到 我在想 应该可以使用 //#CGO CFLAGS:-LC:..\include貌似没有效果直接把core.cpp 中的#include <>,修改为绝对路径或相对路径不行吗?
#include <C:\Qt\Qt5.8.0\5.8\mingw53_32\include\QtCore\QAbstractAnimation> 结果:C:\Qt\Qt5.8.0\5.8\mingw53_32\include\QtCore\qglobal.h:95:37: fatal error: QtCore/qsystemdetection.h: No such file or directory 欸:添加了//#cgo CPPFLAGS= -LC:/Qt/Qt5.8.0/5.8/mingw53_32/include 也无效
我记得我配置的时候是改了几个cpp包含的.h路径的,大概改了七八个文件就没有报错了
谢谢 你的 解答和项目 让我对 Cgo的 理解 在这个过程 深了 很多
您 的 go IDE 也是 用 LiteIde 吗 因为 我看见 您的 项目 rcc_cgo_xxx.go 文件已经包含 插入了 很多 头文件了啊 。我怀疑是否因为我使用 LiteIDE的问题。
我也用的liteide,用therecipe/qt 之前要先执行qtsetup.exe。这是是go install github.com\therecipe\qt\cmd\qtsetup 生成的
解决 非常有价值的 项目 /*
#cgo CFLAGS: -pipe -fno-keep-inline-dllexport -O2 -Wall -Wextra -DUNICODE -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN
#cgo CXXFLAGS: -pipe -fno-keep-inline-dllexport -O2 -std=gnu++11 -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN
#cgo CXXFLAGS: -I../../qt -I. -IC:/Qt/Qt5.8.0/5.8/mingw53_32/include -IC:/Qt/Qt5.8.0/5.8/mingw53_32/include/QtSvg -IC:/Qt/Qt5.8.0/5.8/mingw53_32/include/QtWidgets -IC:/Qt/Qt5.8.0/5.8/mingw53_32/include/QtGui -IC:/Qt/Qt5.8.0/5.8/mingw53_32/include/QtANGLE -IC:/Qt/Qt5.8.0/5.8/mingw53_32/include/QtCore -IC:/Qt/Qt5.8.0/5.8/mingw53_32/include/Qt3DRender -Irelease -IC:/Qt/Qt5.8.0/5.8/mingw53_32/mkspecs/win32-g++
#cgo CXXFLAGS: -IC:/Qt/Qt5.8.0/5.8/mingw53_32/include/QtMultimedia -IC:/Qt/Qt5.8.0/5.8/mingw53_32/include/QtDBus -IC:/Qt/Qt5.8.0/5.8/mingw53_32/include/QtDesigner -IC:/Qt/Qt5.8.0/5.8/mingw53_32/include/QtQuick
#cgo CXXFLAGS: -IC:/Qt/Qt5.8.0/5.8/mingw53_32/include/QtTest -IC:/Qt/Qt5.8.0/5.8/mingw53_32/include/QtSerialPort
#cgo LDFLAGS: -Wl,-s -Wl,-subsystem,windows -mthreads
#cgo LDFLAGS: -lmingw32 -LC:/Qt/Qt5.8.0/5.8/mingw53_32/lib -lqtmain -LC:/utils/my_sql/my_sql/lib -LC:/utils/postgresql/pgsql/lib -lshell32 -lQt5Core -lQt5Svg -lQt5Widgets -lQt5Gui -lQt5Core
#cgo LDFLAGS: -Wl,--allow-multiple-definition */
楼主出一个配置环境的教程呀- - 麻烦了
这个能不能去掉cmd命令窗口。一关掉命令窗口,界面也会关
使用https://github.com/therecipe/qt/tree/master/cmd/qtdeploy 进行编译,不会出现命令提示符窗口
目前发现内存泄漏的问题,是由于therecipe/qt内存不能自动释放导致的,还没有找到有效的解决方案
用therecipe/qt写东西编译好慢...改一点东西. 然后qtdeploy -fast build desktop 就要几十秒....