qmake

How to build qtwayland?

我与影子孤独终老i 提交于 2019-12-07 16:08:35
问题 I spent whole day trying to use QtWayland.Compositor 1.0 in Qt creator. I have followed all the steps from there https://wiki.qt.io/QtWayland but I get the following error. I don't know what does it mean, that is my first contact with linux. I have the newest linux mint on a vm. $ sudo make install cd src/ && ( test -e Makefile || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /home/emil/wayland/qtwayland/src/src.pro -o Makefile ) && make -f Makefile install make[1]: Entering directory '/home/emil

QMake: Referencing a library using relative paths

…衆ロ難τιáo~ 提交于 2019-12-07 06:05:17
问题 I have a Qt project using SQLite, so I have the following directory structure: C:\Workspace\MyProject\MyProject.pro C:\Workspace\MyProject\sqlite3\sqlite3.lib Adding sqlite3.lib with absolute paths works fine: LIBS += -L"c:/Workspace/MyProject/sqlite3" -lsqlite3 But I can't make it work with relative paths. I try with: LIBS += -L"sqlite3" -lsqlite3 But that fails with: :-1: error: LNK1104: cannot open file 'sqlite3\sqlite3.lib' I tried but LIBS += -L"../sqlite3" or even LIBS += -L"../..

ld linkage problems: /usr/bin/ld: cannot find [libraryname]

无人久伴 提交于 2019-12-07 04:29:27
问题 Im using Qmake to build a shared library on Ubuntu 9.10 This shared library (A) has a dependency on another shared library (B). project B has been successfully built. in the .pro file for project A, my LIBS variable looks like this: LIBS += -L../datelib/bin -llibdatelib_release.so.1.0.0 (I used the full shlib name because the library versions are different.) In any case, when I attempt to build project A, it breaks at the linkage stage, and prints the error message: /usr/bin/ld: cannot find

How to specify separate compilation options for different targets in qmake?

谁说我不能喝 提交于 2019-12-07 02:56:49
问题 Is there any way to specify separate compilation options for different targets in qmake ? For example: QMAKE_CXXFLAGS += -O SOURCES += file1.cpp QMAKE_CXXFLAGS += -std=gnu++0x -O SOURCES += file2.cpp So file1.cpp will be compiled only with -O option and file file2.cpp with -std=gnu++0x -O options. 回答1: You could create and use a separate "extra compiler", as follows: # Use the built-in compiler for file1.cpp QMAKE_CXXFLAGS += -O SOURCES += file1.cpp # Create a new compiler for file2.cpp

What are the merits of debug_and_release config feature in qmake?

房东的猫 提交于 2019-12-07 02:53:15
问题 I can see only one merit of the feauture: we are able to issue the make all commad. Well, I do not call make in any point of my developer's life. I use Qt Creator and when I build the project I want it strictly as debug or as release. I guess this is an expeted behaviour by people. But debug_and_release is on by default in Qt Creator. Is there a merit in this I can't see? Is there some sense in the unintuitive mess like this: CONFIG( debug, debug|release ) { # debug } else { # release } which

VS2015编译QGC,提示筛选器下已存在"*.qrc"

左心房为你撑大大i 提交于 2019-12-06 12:44:46
qt creator 可以正常编译qgc,vs2015打开提示错误。 解决:把qgroundcontrol目录下的.qrc删除, mkdir build cd build qmake -tp vc ../qgroundcontrol.pro 接着vs打开qgc生成的.vcxproj工程。 此时,把刚刚删除的.qrc都恢复。 再次使用qt creator编译,运行,确保程序可以正常执行。 此时vs2015工程应该是可以打开了。编译,解决遇到的问题。 如,宏定义找不到等问题 setOrganizationName(QGC_ORG_NAME); // QGC_ORG_NAME找不到 setOrganizationDomain(QGC_ORG_DOMAIN); //QGC_ORG_DOMAIN找不到 this->setApplicationVersion(QString(GIT_VERSION));//GIT_VERSION找不到 来源: https://my.oschina.net/yeahlife/blog/3137518

“no rule to make target…” error with undocumented files(glob) function

雨燕双飞 提交于 2019-12-06 08:27:37
I´ve got one project, where all my .h and .cpp files are included. This project builds my application. Another project has all my unit tests in it, which require the same .h and .cpp files as the first project. So everytime I add a new file to my first project I have to add it to the second project too, which is why I tried to automate that step. For this I tried to use the files(glob) function of qmake, which looks basically like this: HEADERS += \ someotherstuff.h \ files(../Core/DriveProgramInterface/*.h) \ files(../Core/DriveProgramWizard/*.h) SOURCES += \ someotherstuff.cpp \ files(..

Getting QMake to generate a proper .app

有些话、适合烂在心里 提交于 2019-12-06 07:08:08
问题 I have a large exiting C++ project involving: 4 applications 50+ libraries 20+ third party libraries The project uses QMake (part of Trolltech's Qt) to build the production version on Linux, but I've been playing around at building it on MacOS. I can build in on MacOS using QMake just fine but I'm having trouble producing the final .app. It needs collecting all the third party frameworks and dynamic libraries, all the project's dynamic libraries and making sure the application finds them. I

Prepend/Append Makefile to a Qt generated Makefile

ぐ巨炮叔叔 提交于 2019-12-06 05:39:53
问题 I have a building environment where I add some prepending and appending lines to each Makefile generated. It would be nice if I could put this lines into the qmake generated file via my project file ( .pro ). Of cause I can do this via some easy shell scripting but it would be much nicer to do it from inside of the project file. Is there any qmake command to use? Does anyone have any idea how to do this? Example: include $(ROOT)/prepend.mk $(LIB):$(OBJ) @echo ... include $(ROOT)/append.mk 回答1

GNU make --jobs option in QMAKE

自作多情 提交于 2019-12-06 02:12:34
问题 I am using qmake to generate MinGW32 Makefiles for a small Qt C++ app we are developing. My problem: all those dual/quad core CPUs are sitting there idly while only one thread is doing the building. In order to parallelize things I tried passing --jobs 4 to make, but the problem is that qmake generates a generic makefile inside of which make gets called again with -f . Is it possible to force qmake to add options to make when generating the makefile? Or maybe there's another way of setting