There are qmake methods that take a string and there are methods that take a variable. Replace $$find($$QMAKESPEC, "msvc") by $$find(QMAKESPEC, "msvc"). Testme message("Test me") message($$QMAKESPEC) # MSVC message($$find($$QMAKESPEC, "msvc")) message($$find(QMAKESPEC, "msvc")) # linux message($$find($$QMAKESPEC, "linux")) message($$find(QMAKESPEC, "linux")) # g++ does not work because it is a regular expression message($$find($$QMAKESPEC,...
When a C preprocessor macro is expanded, its parameters are expanded to their literal arguments, so s would be expanded to A when your QUOTE(s) taking argument A is expanded. Normally, after this expansion is complete, the expanded text is then scanned again to expand any macros embedded therein, so...
python,c++,qt,qmake,qt-signals
The offending line is this: PyType_Slot *slots; /* terminated by slot==0. */ The problem is that with this line, "slots" is a keyword by default in Qt. In order to use that variable name in other projects, you will need to use this in your project file: CONFIG += no_keywords...
You can use QMAKE_MAKEFILE += build/makefile in your project file to create the makefile...
I am also using Archlinux for Qt 4 purposes, and the issue is this: QT += webkit webkitwidgets ^^^^^^^^^^^^^ The Qt GUI was separated into QtGui and QtWidgets in Qt 5. That also included the restructuring of the QtWebKit module to reflect the changes. Therefore, in Qt 4, there were...
opengl,linker,qt-creator,qmake,glew
Right after I posted the question, I found the issue. Embarrassingly, it was an issue I have run into before with assimp (although I just now realized why re-building it with cmake worked). The hallmarks: Weird linker errors with a library when you know the library is being found. You...
You don't have to specify target.files, target is a special case and it's predefined in qmake. http://qt-project.org/doc/qt-4.8/qmake-environment-reference.html#installs If you append a built-in install set to the INSTALLS variable and do not specify files or extra members, qmake will decide what needs to be copied for you. Currently, the only supported...
c++,qt,qt-creator,qmake,subdirs
You can do a project like this : MyProject: project.pro App App.pro main.cpp lib1 lib1.pro lib1.pri lib1.h lib1.cpp lib2 lib2.pro lib2.pri lib2.h lib2.cpp project.pro TEMPLATE = subdirs CONFIG += ordered SUBDIRS += \ lib1 \ lib2 \ App App.pro QT += core QT -= gui include(../lib1/lib1.pri) include(../lib2/lib2.pri) TARGET = App...
I solved this problem with "static library config" so that it will not make ".so" libs and then link that static library with main program. TEMPLATE = lib CONFIG += staticlib ...
Huh! I found the solution and it may sounds like buy yourself some brain. I thought, that qmake is launched every time the project file is changed (output of message commands proved my thoughts), but it's not really the way things happen in Qt. I don't know how exactly, but...
Try to deploy your application using The Windows Deployment Tool which could be found in QTDIR/bin/windeployqt.exe. It automatically puts all necessary files in your application directory. Open your command prompt and add the path to your Qt directory and it's bin folder to the PATH variable like : set PATH=...
There are two straightforward ways to accomplish this, depending on how self-contained / portable you want your solution to be and how lenient you want to be with the order of command execution. Option 1 The first option is to create a custom target in the .pro file for the...
I think your problem is (at least) this line: INCLUDEPATH += ./Libraries/SMTPClient/debug I am almost certain that this is not the right path to the include path where the headers can be found including emailadress.h. You have explained the LIBS values that you have tried as well as the lib...
c++,qt,qt5,qmake,qgroundcontrol
Qt 5.2.1 is unsupported as of writing this. See their issue tracker for details: Switch to Qt >= 5.1 #286 Also, if you happen to use VS2013, that is also unsupported....
./release\addeditaton.o:addeditaton.cpp:(.text+0x6ac2): undefined reference to `_imp___ZN10HTTPClient5abortEv' Lines like that usually means at least either of the following issues: You do not have the corresponding library installed. You do not have the correct version installed with the symbols you rely on. Your linkage options are not set up properly. In this...
This is in fact a Qt bug which affects mingw : https://bugreports.qt.io/browse/QTBUG-44142 An easy workaround is to edit the file mkspecs\features\c++14.prf and comment out the line greaterThan(QT_GCC_MAJOR_VERSION, 4)|greaterThan(QT_GCC_MINOR_VERSION, 7): \...
Forming my comment into a proper answer; this is not the correct syntax to use: LIBS += -L/usr/local/lib -libusb-1.0.a LIBS += -L<libusb.h> The proper one would be this: LIBS += -L/usr/local/lib -lusb-1.0 or LIBS += -l/full/path/to/libusb-1.0.a You can drop the second LIBS line in your initial attempt because you have...
QT_INSTALL_PLUGINS is one of the built-in properties of qmake. The manual of qmake in Qt 4.8 talks about qmake's built-in properties but does not mention QT_INSTALL_PLUGINS specifically. The manual of qmake in Qt 5 shows a much longer list of built-in properties including QT_INSTALL_PLUGINS. If you take a look...
As it is mentioned in the comment, your path is not correct because it contains a space which is apparently not handled properly by qmake: C:\Users\Darrel\Desktop\New folder\AnotherTest\AnotherTest.pro ^ Try to remove that, so something like this should work: C:\Users\Darrel\Desktop\Newfolder\AnotherTest\AnotherTest.pro ^^^^^^^^ ...
c++,qt,qt-creator,qmake,qtwidgets
Is there a way to do this automatically? Yes and no. You could run qmake like this: qmake -project "QT+=widgets" and then it is generated properly, but other than that from the command line, no. Also, note that you would like to use a guard if you plan to...
Idea 1 MSVC places object files usually into a release/debug sub-directory of the build dir. The other compilers don't. Thus you just have to add release/ or debug/ between ${QMAKE_VAR_OBJECTS_DIR} and ${QMAKE_FILE_IN_BASE}, e.g. win32:CONFIG(release, debug|release): ExtraCompiler.output = ${QMAKE_VAR_OBJECTS_DIR}release/${QMAKE_FILE_IN_BASE}$${QMAKE_EXT_OBJ} else:win32:CONFIG(debug, debug|release): ExtraCompiler.output = ${QMAKE_VAR_OBJECTS_DIR}debug/${QMAKE_FILE_IN_BASE}$${QMAKE_EXT_OBJ} else: ExtraCompiler.output =...
Given that your pasted files look correct and work here, I am leaning towards that your problem is this line: INCLUDEPATH += ../kernel/ You likely execute qmake from the project root where your main project file resides calling qmake recursively to generate the Makefiles. However, at the point of generation,...
Here is my solution to iterating for each build for windows (definitely prefer bash): create a version.bat containing: @echo off set /p var= <version.txt set /a var= %var%+1 echo %var% >version.txt break >version.h echo #define VERSION_MAJOR 1 >version.h echo #define VERSION_MINOR 0 >>version.h echo #define VERSION_BUILD %var% >>version.h echo %var%...
c++,qt,compiler-construction,visual-studio-2013,qmake
As i know after the build of qmake.exe it is copyed to the bin folder from qmake folder. Can the Problem be the "+" in your Path? Try to search for the qmake.exe in Qt+Vs13 folder.
Shouldn't you include 'Q_OBJECT'(http://qt-project.org/doc/qt-4.8/signalsandslots.html) here? : class Myclass : QObject{ Q_OBJECT // <-- here signal: void mySignal(); public: void f(); Image *img; } Edit: Generally 'multiple definitions of ...' can be repared with 'static' (ie 'static void f()') Edit: Did you look here? Multiple definitions error: one in my file...
You have a couple of issues in here: You are trying to set a C++ option for the CFLAGS variable as opposed to CXXFLAGS. if I were, I would pass the "CFLAGS+=-std=c++11" to the first qmake run when the project file is created because the variable will be put into...
c++,qt,internationalization,qt5,qmake
Looks like I fixed it. Instead of translator.load("../../i18n/{translationfile}"); I use QDir dir(":/i18n"); translator.load(dir.absoluteFilePath({translationFile})); I also added a i18n.qrc file to my pro file: RESOURCES += images.qrc \ i18n.qrc It works if I move the binary/executable to another folder and execute it from there, so I guess that's all that is...
qt,compilation,qt-creator,qmake
Follow this step should fix your issue : Do a build clean run qmake again enjoy ...
Based on our comments and outcome, it seems that a quick solution is to add the libraries explicitly that you wish to use. It will generate something like this in the background, so basically using static libraries as opposed to dynamic: win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../../../../../Qt/Qt5.2.1/5.2.1/mingw48_32/lib/libQt5Core.a else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS +=...
qt,makefile,pyqt,qmake,python-sip
The issue was occurring due to make using string matching to link dependencies to targets, rather than detecting if a target/dependency is a path and doing any relevant conversion. In my case, it was because the library dependency for my generated source file was listed as a relative path (../../Syren2/core/sipOutput/sipcoreSy_version.cpp),...
You just follow the same install procedure except that you install the components into a path where they will be recognized when they are imported. See the import path list in the engine. By default, the list contains the directory of the application executable, paths specified in the QML2_IMPORT_PATH environment...
c++,qt,qmake,qobject,qt-signals
Found the problem...I was building a Qt5.5 project with qmake version 4...
Turning my comment into a proper answer: Q: It executes suspiciously fast. You wish to run qmake recursively in a recursive build system structure such as Qt3D. That means you would need to pass the -r option to qmake, which is passed by default if you use QtCreator. You need...
It works now with the addition of a: ODB_FLAGS += -I$(BOOST_RT) (where that was the library in the INCLUDEPATH I that was being "invalidated". in the .pro file...
POSIX defines something about the c99 command (but AFAIK nothing about C++). However, the qmake utility will usually be able to find out (or at least to expect) what is the C++ compiler and how to invoke it. Notice that it is generating a Makefile Outside of Qt you might...
One way to make this work properly (the one I use with Qt 4.8) is to have a separate .pro file for the test program. The main program's .pro file does NOT include the test code. QT += core gui qt3support xml script TARGET = simui TEMPLATE = app SOURCES...
I am sorry to say this, but you need to learn basic C++. The proper syntax is this for such things in C++ with Qt: connect(m_osgWidget->picker.get(), SIGNAL(setX(const QString&)), m_addAgentDlg, SLOT(getX(const QString&))); // Why do you call it getX? Should it be called setText instead? void getX(const QString& string) { ui->textEdit->setText(string);...
qmake creates the path to the default template Info.plist.app relative to the source directory of the project. Expected behavior would be to have it relative to the build directory. So I'd call it a Qt bug. In order to get rid of the error, you should have your build directory...
c++,qt,qmake,qtgui,qtmultimedia
You need to include the corresponding header as follows: #include <QVideoWidget> You may also need to add this to your project file: QT += multimediawidgets ...
try to use .uninstall command. mytarget2.path = ~/Documents/inst mytarget2.target = test.txt mytarget2.commands = @echo "custom command" mytarget2.uninstall = @echo "uninstall" INSTALLS += mytarget2 it will generate this makefile: ####### Install install_mytarget2: first FORCE @test -d $(INSTALL_ROOT)/Users/mac/Documents/inst || mkdir -p $(INSTALL_ROOT)/Users/mac/Documents/inst @echo custom command uninstall_mytarget2: FORCE @echo uninstall -$(DEL_DIR) $(INSTALL_ROOT)/Users/mac/Documents/inst/ install:...
There are two approaches to address this problem. Not to check againt the initially empty directory docInstall.CONFIG += no_check_exist directory Since this directory will be created on the fly, I would personally opt for this. Create the directory explicitly createDirs.commands = $$QMAKE_MKDIR $$PWD/html This could be done either in a...
This is actually the feature of QtCreator. It shows you all of included files, regardless the conditions, but it should compile correctly. You can read developer's list for more info: http://lists.qt-project.org/pipermail/qt-creator/2012-March/000419.html My understanding from earlier discussions is that this is intentional. The theory is that you're interested in modifying the...
in the project tab in QtCreator you can specify a custom environment variable that will be used for the build with $$(VAR) you can query it during qmake and ide = $$(IDE) contains(ide, qtcreator){ CONFIG+=debug }else{ # Build release version # CONFIG+=debug # CONFIG+=declarative_debug CONFIG+=release ## Optimize flags QMAKE_CXXFLAGS_RELEASE +=...
qt,qt-creator,qmake,project-organization,project-structure
I think separation of code modules from each other as much as possible is a good idea. This way you can have independent software modules which are reusable and able to be changed easily. I personally use Subdirs to separate parts of my code. Using it, the project becomes much...
embedded-linux,qmake,buildroot
Are you using Qt4 or Qt5 ? Your package/dummypgm/Config.in should have a depends on on one of them, and your dummypgm.mk should have a DUMMYPGM_DEPENDENCIES = qt or DUMMYPGM_DEPENDENCIES = qt5base. My intuition is that you are using Qt5. In this case, you shouldn't call $(QT_QMAKE), but $(QT5_QMAKE). Have a...
Can be done using for() loop. You may need to adjust the BUILD_DIR variable. The "other" files are takes from the current directory. OTHER_FILES += \ input1 \ input2 \ input3 \ BUILD_DIR = build for(file, OTHER_FILES) { eval($${file}.depends = $$file) eval($${file}.target = $$BUILD_DIR/$$file) eval($${file}.commands = cp $$file $$BUILD_DIR/) QMAKE_EXTRA_TARGETS...
Try replacing the custom build steps with QMAKE_POST_LINK commands (QMAKE_POST_LINK Reference) They can be linked to a script that can be committed: win32 { QMAKE_POST_LINK = install/win/deploy } unix { QMAKE_POST_LINK = install/unix/deploy } To create pre-build steps, this is a nice example: Pre-pre-build commands with qmake....
Use the UI_DIR variable. This is where those files will be generated.
$$PWD is the path of the .pro file being parsed at the time the variable is encountered. If your $$PWD is in an include file, you may want to use $$_PRO_FILE_PWD_ instead, as this points to path of the project file, not any of its includes. Your use of $$PWD...
Just for the evidence this script I used for git version on Linux: #!/bin/bash echo "Generating header for git hash" $1 $2 GIT_HEADER="$1/$2" if [ -z "$2" ]; then GIT_HEADER="$1/git_version.h" fi GIT_VERSION="`git -C \"$1\" describe`" if grep --quiet $GIT_VERSION $GIT_HEADER; then echo "No need to generate new $GIT_HEADER - git...
qt,makefile,linker-error,qmake
As stated in the docs, you need to include the widget library to use QApplication. Add this to your project file: QT += widgets If you're not going to build a GUI app, use QCoreApplication instead. It doesn't have that dependency....
...ui_mainwindow.h:42: error: undefined reference to `_imp___ZN8QWebViewC1EP7QWidget' The linker does not find the the webview widget symbol. I think those errors usually occur without Qt += webkit, but in this case that's not what's happening. That is correct, however the QtWebkit module was split into webkit and webkitwidgets in Qt...
Use the INSTALLS qmake variable public_headers.path = include public_headers.files = include/*.h INSTALLS += public_headers Then you can call make install (with a proper prefix, see e.g. this question), which should result in the headers being installed alongside the binaries....
c++,sdl,qt-creator,qmake,sdl-1.2
I have found a solution this is my finale *.pro file TEMPLATE = app CONFIG += console # supprime cette ligne si t'as pas envie de voir de console lors de l'execution du programme CONFIG -= app_bundle CONFIG -= qt LIBS += -L C:/Qt/Tools/SDL/SDL1/lib -lSDL -lSDLmain INCLUDEPATH += C:/Qt/Tools/SDL/SDL1/include/ win32:QMAKE_LIBS_QT_ENGTRY...
c++,qt,qmake,unresolved-external,crypto++
Here is the version of .pro file for CryptLib with which built library is linkable. QT -= core gui QMAKE_CFLAGS += /Zc:wchar_t /GL TEMPLATE = lib TARGET = cryptlib Release:DESTDIR = ./Release Debug:DESTDIR = ./Debug CONFIG += staticlib DEFINES += _USING_V110_SDK71_ WINVER=0x0501 WIN32 _WINDOWS _MBCS USE_PRECOMPILED_HEADERS DEFINES -= UNICODE DEPENDPATH...
After sacrificing some of the modularity and complexity of the Tool.pro file above, I was able to build the project using cmake. Here's the CMakeLists.txt file that I wrote: project( slugs ) cmake_minimum_required( VERSION 2.6 ) add_definitions ( -Wall ) add_definitions ( -D USE_CUDD ) set ( BDDFLAGS "-mtune=native -malign-double...
On Windows you can use DLLDESTDIR variable which specifies where to copy the target dll or exe. Just add this to your .pro : CONFIG(release, debug|release): DLLDESTDIR += $$PWD/../exec On Linux you can use QMAKE_POST_LINK variable which contains the command to execute after linking the TARGET together. So it is...
Try this way: win32-msvc* { system(cl|grep "Compiler Version 18.") { message( "msvc 2013 detected" ) QMAKE_CXXFLAGS += /FS } } http://qt-project.org/doc/qt-4.8/qmake-function-reference.html Can't test it I don't have Windows machine now....