qmake

Linux编译移植Qt5的环境_OMAPL138平台

蓝咒 提交于 2020-05-01 21:51:41
Linux编译移植Qt5_OMAPL138 【导语】:昨天编译Qt5各种失败,各种离奇的错误在Google上面也搜索不到,真是让人“蛋疼菊紧”,今天把所有的环境全部清理干净,也重新解压了Qt5.1.1的源码包,重新走了一遍,效果还可以,也没有出现PDA LTS什么库问题,现在整理一下详细过程和细节点。 另外说一下,我使用Qt5.8.0的源码包进行编译,我的OMAPL138的ARM9架构,在configure阶段就提示我your platform arch too old. 意思就是我的平台的架构太老了,所以如果在ARM9的架构上面编译Qt5,选择一个稍微老一点的版本。我这里选择Qt5.1.1 **再补充一点:如果在曾经执行过./configure这个命令了,如果出了问题进行修正,最好把这个源码包删除,重新解压一个源码包,说不定哪个配置属性就影响了后续的操作,我之前就是总在这个里,以为每次./configure都是重新配置,然而并不是这样。 ** 编译Qt5.1.1 1 准备工作 Qt5.1.1的开源源码包: 官方下载地址:qt-everywhere-opensource-src-5.1.1.tar.gz 交叉编译环境:(只适合OMAPL138)链接: https://pan.baidu.com/s/1sl9NuPn 密码: g4m8 2 配置源码文件 下载qt-everywhere

mingw qt(可以去掉mingwm10.dll、libgcc_s_dw2-1.dll、libstdc++-6.dll的依赖,mingw默认都是动态链接gcc的库而TDM是静态链接gcc库,t...

只愿长相守 提交于 2020-04-26 05:42:54
原文地址: mingw qt 作者: 孙1东 不使用Qt SDK,使用mingw编译qt源代码所遇问题及解决方法: configure -fast -release -no-exceptions -no-rtti -no-stl -no-qt3support -no-opengl -no-multimedia -no-webkit -no-script -no-scripttools -nomake tools -nomake examples -nomake demos -nomake docs -nomake translations -platform win32-g++ 强烈推荐使用tdm版本的mingw gcc,相比官方mingw的慢速,晦涩,tdm的安装过程简单,清晰,更新也快 ,而且官方的mingw开发人员也在使用tdm(为啥不合并了算了呢)。 【关于mingw10.dll,libgcc_s_dw2-1.dll,libstdc++-6.dll】 mingwm10.dll 是线程安全的异常处理时用到的清理函数,否则将会有内存泄漏。 libgcc_s_dw2-1.dll 是gcc 的核心运行库。 libstdc++-6.dll 是gcc支持的特定语言c++的运行库。 用mingwrt3.18之前编译出来的qt库,默认依赖mingwm10.dll。 使用mingwrt3

Qt 手动添加ui文件到工程(转)

扶醉桌前 提交于 2020-04-12 17:25:44
制作ui文件 先应该用Qt Designer绘制一个自己的界面,并存为myform.ui(这里的myform可以用自己喜欢的名字代替)。在制作自己的界面文件时要注意以下几个要点: 1、要记住ui文件的名字,因为uic生成的代码会存在ui_myform.h里; 2、要记住主窗体的object name, 因为ui文件提供的类名将以这个form的名字来命,例如主窗体名字为MainWindow,则ui文件提供的类名会命名为Ui_MainWindow; 3、要特别注意你的form选择的基类要和你代码中的窗体类兼容; 4、要记得给每个后面需要访问到的控件起一个有意义并且好记的object name, 因为ui文件提供的控件将以这些object name来命名; 将ui文件加入工程 1.已经存在pro文件的,修改pro文件,加入FORMS+=myform.ui 2.直接运行qmake -project命令,该命令非常智能,可以识别后缀名为.ui、.h、.cpp等文件,并将之加入工程; 在代码中引用ui文件 官方介绍的使用ui文件的方法有三种,一个是直接引用,二是单继承,三是多继承。 第一种方法其实很不实用,大家去看一下文档中的例子就可以了;第二种和第三种没有本质的差别,可以并作一类,这里做重点介绍。 ui文件最终会被编译成标准的C++代码,并存入一个.h文件中,这个过程在调用make之后才进行

How to have static linkage in a shared library in Qt Creator?

。_饼干妹妹 提交于 2020-03-25 18:26:07
问题 The question says all the thing. I am using Qt Creator, which uses QMake and I want to build a .so shared library file that has all its dependencies statically linked. Like libstdc++ , and etc. But when I use CONFIG += static it also changes the library to a static library and produces a .a static file, which I don't want it. So my question is not a duplicate of this. I searched here but I was not able to find any suitable thing. 回答1: CONFIG += static is the wrong flag, as stated by the

Adding custom commands to existing targets in qmake

南笙酒味 提交于 2020-03-17 08:34:11
问题 Is there a way to specify, in a .pro file, extra commands to be added to a standard target in the Makefile that qmake generates? For example, consider distclean , extra commands might be desired to: Remove *~ files. Clean out runtime-generated output files from the source tree. Etc. I want to use the normal target and not a custom target because I want this to be completely transparent in my workflow. That is (again using distclean as an example), I don't want to... ... require knowledge in a

Qt not refreshing Makefiles after changes in the .pro file

纵然是瞬间 提交于 2020-01-30 06:01:52
问题 I'm finding a strange issue with Qt Creator 3.0.1 that is not refreshing the current state of the configuration before compiling and linking. To explain myself better, say my code isn't initially compiling because it's missing a library (e.g. opencv_core248d). If I add it in the .pro file like this: LIBS += -L$$(OPENCV_DIR)/build/x86/vc11/lib -lopencv_core248d the project won't compile and link until I go and manually delete the makefiles generated by qmake (Clean All doesn't work!). After

How to port a qmake project to cmake

為{幸葍}努か 提交于 2020-01-22 16:47:40
问题 I would like to "port" this C++ project, which uses qmake (i.e., a Tool.pro file) for building, to cmake . Essentially, I'm asking how to go about writing the necessary CMakeLists.txt file(s) by looking at the Tool.pro file above. This is what I've done so far: include_directories(../lib/cudd-2.5.0/include BFAbstractionLibrary) add_executable(slugs BFAbstractionLibrary/bddDump.cpp BFAbstractionLibrary/BFCuddVarVector.cpp BFAbstractionLibrary/BFCudd.cpp BFAbstractionLibrary/BFCuddManager.cpp \

qmake command to copy files and folders into output directory

≡放荡痞女 提交于 2020-01-14 07:59:06
问题 I'm developing an app that should build on Windows, Linux and OS X using QtCreator and Qt 5.3. I want to copy all files and subfolders from a folder into output folder. I've got it working for Linux and OS X, but not for Windows. Here's the relevant section of my .pro file: win32 { PWD_WIN = $${PWD} DESTDIR_WIN = $${OUT_PWD} copyfiles.commands = $$quote(cmd /c xcopy /S /I $${PWD_WIN}\copy_to_output $${DESTDIR_WIN}) } macx { copyfiles.commands = cp -r $$PWD/copy_to_output/* $$OUT_PWD } linux {

Make qmake use qt5 by default

我是研究僧i 提交于 2020-01-12 07:35:09
问题 I have both qt4 and qt5 on my Linux system. qt4 is used by default. What is a clean way to change that so that qmake uses qmake-qt5 by default? 回答1: The system might have different meta packages that handle the default. For example on Debian there is a qt4-default and a qt5-default package, installing one of them will uninstall the other and set the symlinks appropriately 回答2: There is a tool named qtchooser to switch between Qt versions. On Debian and Ubuntu you can install it with apt-get

How to get a Makefile from qmake

穿精又带淫゛_ 提交于 2020-01-11 04:38:05
问题 Given an x.pro file, how can I produce a makefile? Running qmake x.pro produces an x.pbproj directory without a Makefile. Thanks Edit: Adding info. about the pro file and platform. I am running this on Mac OS X (10.6). The same pro file used to produce a Makefile under OpenSUSE. Here is a snippet of the pro file: TEMPLATE = lib TARGET = x DEPENDPATH += INCLUDEPATH += CONFIG += qt debug QT = core network # Input LIBS += -lcryptopp HEADERS += x.hpp ..... # rest of the header files 回答1: I gues