qmake

undefined reference to `_imp___ZN10HTTPClient5abortEv' and others

烈酒焚心 提交于 2019-12-23 02:32:07
问题 I am migrating a huge project from Qt 4.x to 5, I am almost finished but Im having errors that I cannot locate, I think it has to do with the linkage of some libraries but I am somewhat lost here. I hope someone can throw some light on this matter. Errors: ./release\addeditaton.o:addeditaton.cpp:(.text+0x6ac2): undefined reference to `_imp___ZN10HTTPClient5abortEv' ./release\addeditaton.o:addeditaton.cpp:(.text+0x98c5): undefined reference to `_imp___ZN10HTTPClient3getE7QStringbb' ./release

How to add add custom assets into .apk file?

爱⌒轻易说出口 提交于 2019-12-22 11:14:24
问题 I need to have some files in android assets folder, how can I add them using QtCreator/QMake? 回答1: Assuming you have the following structure in your source directory: foo.pro extra_data/file1 extra_data/file2 … Adding the following to foo.pro should deploy the extra_data folder to assets://extra_data (exact path might differ, cannot verify right now) in the APK: folder_01.source = extra_data folder_01.target = extra_data DEPLOYMENTFOLDERS += folder_01 回答2: If you are developing the

Using conditions when customize qt project

痴心易碎 提交于 2019-12-22 05:59:37
问题 Good day! I have a qt project and I want to customize it using .pro-file conditions. Notably, I want to use one .pro-file to get several outputs, something like that: DEFINES += APP1=0 APP2=1 DEFINES += TYPE=APP1 if(TYPE == APP1) { LIBS += <LIB1> DESTDIR = <DIR1> } else { LIBS += <LIB2> DESTDIR = <DIR2> } But when I try to build my project I get the following error when running qmake: Parse Error('else') How to do it correctly? 回答1: The values stored in the CONFIG variable are treated

How to quell qmake's “WARNING: Failure to find:”?

不想你离开。 提交于 2019-12-22 05:15:34
问题 I'm using PRE_TARGETDEPS to generate source files, and I'm adding the generated source files to SOURCES for compilation. The output of my generator obviously doesn't exist at the time qmake is run, so qmake outputs WARNING: Failure to find: for each of the to-be-created source files. How can I quell this warning, since I know my PRE_TARGETDEPS is going to produce those files? Or, is there a better way to generate intermediate files using qmake? Example Here's a complete test.pro file that

Cannot run qmake in Mac Terminal

时光怂恿深爱的人放手 提交于 2019-12-22 03:25:20
问题 I'm learning Qt for my C++ course at college. I am trying to set up the environment for my first assignment but I can't seem to get it right. I swear I have run qmake in the terminal before, but now since I installed Qt 5.2 with Qt Creator I can't create the projects in the terminal. None of the commands are recognised and on top of that if I try to compile a standard C++ file with #include <QtGui> the compiler won't find it. The g++ compiler that I'm using will not find any of the Qt

Adding custom target in qmake

旧城冷巷雨未停 提交于 2019-12-21 22:20:57
问题 I want to build my resources with qmake as follows [Qt 5.5]: imageTarget.target = images.rcc imageTarget.depends = $$PWD/images.qrc imageTarget.commands = rcc -binary -no-compress $$PWD/images.qrc -o $$OUT_PWD/images.rcc QMAKE_EXTRA_TARGETS += imageTarget When I run qmake for my .pro file, it generates the make rule for target images.rcc target as expected: images.rcc: /path/to/images.qrc rcc -binary -no-compress /path/to/images.qrc -o /output/path/to/images.rcc So far so good. However, what

Qt 5.3. QtWidgets: No such file or directory #include <QtWidgets>

落爺英雄遲暮 提交于 2019-12-21 12:07:22
问题 I want to compile Qt example. I get error QtWidgets: No such file or directory #include greaterThan(QT_MAJOR_VERSION, 4): QT += widgets - does not help QT += widgets - does not help INCLUDEPATH += /opt/Qt/5.3/Src/qtbase/include/ - does not help Qt 5.3. Ubuntu 14.04 x64. 回答1: You need to double check that you completed all these steps: Module installed greaterThan(QT_MAJOR_VERSION, 4): QT += widgets You re-run the Qt 5 qmake. Having said that, I would like to remind you that including the

How to avoid having version numbers in .so file name

北慕城南 提交于 2019-12-21 07:10:50
问题 I'm trying to build a dynamic library on Linux using qmake. Here is my .pro file: TEMPLATE = lib TARGET = sqxUiBase QT += core gui CONFIG += dll INCLUDEPATH += ../../public/include DEPENDPATH += . UI_DIR += ../GeneratedFiles RCC_DIR += ../GeneratedFiles CONFIG(release, debug|release) { DESTDIR = ../lib/release LIBS += -L"../lib/release" MOC_DIR += ../GeneratedFiles/release OBJECTS_DIR += release } else { DESTDIR = ../lib/debug LIBS += -L"../lib/debug" MOC_DIR += ../GeneratedFiles/debug

How to avoid having version numbers in .so file name

梦想的初衷 提交于 2019-12-21 07:10:09
问题 I'm trying to build a dynamic library on Linux using qmake. Here is my .pro file: TEMPLATE = lib TARGET = sqxUiBase QT += core gui CONFIG += dll INCLUDEPATH += ../../public/include DEPENDPATH += . UI_DIR += ../GeneratedFiles RCC_DIR += ../GeneratedFiles CONFIG(release, debug|release) { DESTDIR = ../lib/release LIBS += -L"../lib/release" MOC_DIR += ../GeneratedFiles/release OBJECTS_DIR += release } else { DESTDIR = ../lib/debug LIBS += -L"../lib/debug" MOC_DIR += ../GeneratedFiles/debug

How do I make apps smaller with qmake and macdeployqt

£可爱£侵袭症+ 提交于 2019-12-21 04:49:19
问题 How do I make apps smaller with qmake and macdeployqt? I have set QT = core gui in the projects .pro file and run qmake and macdeployqt on the resulting app. The problem is that the program is bundling QtNetwork, QtScript, QtSvg etc. I've tried setting QT -= network script svg (and then make clean, rm -rf *.app, qmake, make). In total the app is 32 MB. .pro file: TEMPLATE = app TARGET = throw DEPENDPATH += . INCLUDEPATH += . CONFIG += x86_64 release QT = core gui unix { CONFIG += link