不使用QT IDE 使用windows(vs) linux(eclipse) 下开发
来源:互联网 发布:网络涉军举报平台 编辑:程序博客网 时间:2024/05/17 02:43
linux:
Eclipse配置
新建一个C/C++工程
添加一个CPP文件 main.cpp
写入
#include "stdio.h"#include <QtWidgets/QApplication>#include <QtWidgets/QLabel>int main(int argc ,char * argv[]){ QApplication app(argc,argv); QLabel *label = new QLabel("Hello Qt!"); label->show(); printf("qt main"); return app.exec();}
1添加qt的包含目录
编译提示错误
error "You must build your code with position independent code if Qt was built with -reduce-relocations. "
解决方案 勾选 Position Indenpendent Code
编译错误 没有添加库
main.cpp:6: undefined reference to `QApplication::QApplication(int&, char**, int)
。。。。。。。。。。
解决方法。添加库文件
如果还提示Qtxxx so缺少依赖库。
libicui18n.so.48, needed by /home/xxxxxxxx/install/Qt/lib/libQt5Core.so, not found (try using -rpath or -rpath-link)
and (from libQt5Core.so) a dozen errors like: /home/xxx/install/Qt/lib/libQt5Core.so:-1: error: undefined reference to ucnv_fromUnicode_48'
解决
windows:
windows下可以通过qt addon 插件。也可以像linux上面一样 添加你自己的cpp然后通过rcc uic moc 编译需要的文件。然后构建
0 0
- 不使用QT IDE 使用windows(vs) linux(eclipse) 下开发
- FBReader 环境设置 (使用windows环境下Eclipse IDE)
- windows 下使用QT,
- Windows下使用Qt
- Windows下使用Eclipse开发Hadoop程序
- Windows下使用Eclipse开发Hadoop程序
- windows下使用eclipse开发hadoop
- Linux下移植pjsip,使用QT开发
- Linux下移植pjsip,使用QT开发
- Linux下移植pjsip,使用QT开发
- Eclipse IDE开发工具使用小技巧
- Java开发IDE工具Eclipse使用笔记
- 【VS开发】 Windows平台下管道的使用
- Linux下安装eclipse做Qt的IDE
- Linux下使用Eclipse开发Hadoop应用程序
- Linux下使用Eclipse开发C\C++
- Linux下使用Eclipse开发Hadoop应用程序
- Linux下使用Eclipse开发Hadoop应用程序
- Linux内核中_IO,_IOR,_IOW,_IOWR宏的用法与解析
- MYSQL中运行sql文件出现 TYPE=MyISAM 错误的解决方法
- 奇异值的几何意义
- 1001 Problem B && 1008 Problem I
- jQuery选择器总结
- 不使用QT IDE 使用windows(vs) linux(eclipse) 下开发
- RGB颜色表
- Unity编辑器模式下退出
- 飛飛(十)倒三角
- C语言中#define的用法
- 商业研究(6):网红和粉丝经济
- Google网络请求框架Volley源码浅析(一)
- spring实现接口加密
- 2016春季练习——水题数论