qmake

MAKEFLAGS in Qt Creator via .pro project file

无人久伴 提交于 2019-12-12 13:27:42
问题 The PC I'm using has 4 cores so I wanna use all them while compiling, which I do by passing the -j4 option to the compiler. In Qt Creator I do that by adding an environment variable in the Build Environment panel, as shown in the images: MAKEFLAGS = -j4 The problem is that this setting doesn't persist across all projects in the PC I'm using, which will be cool. So I have to do that for each project at least once. I think this is stored in the .pro.user file, since every time .pro.user gets

Qt .pro file: how to check if I'm compiling with MSVC 2013 toolset?

雨燕双飞 提交于 2019-12-12 10:37:01
问题 I've tried this condition, but it doesn't work. How to check for MSVC 2013? win32-msvc2013*{ QMAKE_CXXFLAGS += /FS } I'm using Qt 5.3 Beta which has msvc-2013 mkspec. 回答1: Sorry for necroposting, but there seems no googleable solution. Seems I found one. There is vcvars.bat file, which is used for setting correct environment variables for VC. QtCreator, for example, use it while setting Tools -> Options -> Build & Run -> Compilers. Also it is used for MSVC Command Promt. Let`s check

Qt - QMAKE_LIBDIR vs LIBS

天大地大妈咪最大 提交于 2019-12-12 07:58:05
问题 One can find a lot of examples where QMAKE_LIBDIR is used to specify additional library directories. The Qt manual says: QMAKE_LIBDIR Specifies a list of system library paths. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified. Up to now I always used "unix: -L$$(LIB_DIR) -l" or similar whenever I wanted to use an external library in one of my projects and didn't want to use the library wizard. Can I conclude that specifying a path via -L is

android NDK complains std::nearbyint is not a member of std

此生再无相见时 提交于 2019-12-12 04:08:14
问题 I want use std::nearbyint in android gcc but then ndk complains that std::nearbyint is not a member of std. I have the cmath header included in my code & the same builds well for OSX. Is there a workaround for this ? Is possible to write my own version of std::nearbyint ? I am using NDK14b on android 回答1: This is part of https://github.com/android-ndk/ndk/issues/82. GNU's libstdc++ is overly broad with their feature guards. We're working on stabilizing the NDK's solution for libc++ so we can

How can enforce `qmake` to contain `ProvisioningStyle` $ `DevelopmentTeam` fields in `project.pbxproj`?

三世轮回 提交于 2019-12-12 03:53:46
问题 I am using Qmake command line to build my app for iOS and I am struggling to sign my app with xcodebuild because the MyApp.xcodeproj/project.pbxproj that qmake is generating does not the contain the following fields at all ProvisioningStyle DevelopmentTeam How can enforce qmake to contain ProvisioningStyle $ DevelopmentTeam fields in project.pbxproj ? I dont need to have any certain value to be set into the 2 fields. Only, need the fields to be present in appropriate places in project.pbxproj

qmake doesn't add libraries from .pro file to the makefile

强颜欢笑 提交于 2019-12-12 02:35:55
问题 I try to build an QT project using qmake. For this I need the boost library. LIBS += -L/usr/lib/ \ -lboost_system \ -lboost_filesystem But after running qmake, these libraries are not added to the makefile: LIBS = $(SUBLIBS) -L/usr/X11R6/lib64 -lQt5MultimediaWidgets -L/build/buildd/qtmultimedia-opensource-src-5.0.1/lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/x86_64-linux-gnu -lQt5OpenGL -lQt5Multimedia -lpulse -lQt5Widgets -lQt5Network -lQt5Gui -lQt5Core -lGL -lpthread As

QT .pro file: How to change default include path for MAC frameworks

跟風遠走 提交于 2019-12-11 23:29:20
问题 My .pro file looks like this: QT += core gui widgets SOURCES += a.cpp HEADERS += a.h FORMS += a.ui #Locally compiled Qt framework. Qt/out/{QtCore.framework,QtNetwork.framework..} QMAKE_LFLAGS += -L./Qt/lib/ QMAKE_CXXFLAGS += -F./Qt/lib/ macx { QMAKE_MAC_SDK = macosx10.9 LIBS += -framework QtCore -framework QtNetwork -framework QtGui -framework QtWidgets } I want to use frameworks compiled locally, but QT5.5 automatically includes framework from QT5.5.0 install directory ... I see a.cpp

QMake and pkg-config

十年热恋 提交于 2019-12-11 21:12:45
问题 I am using libqtermwidget in one of my Qt applications. It so happens that in version 0.8.0 of the library, some new features have been introduced, which are absent in 0.6.0 version. Since libqtermwidget does not provide any version macros, I would like to use pkg-config to check its version, something like this, in qmake: # i would like a functionality like this if pkg-config --version qtermwidget5 < 0.8.0 DEFINES += OLD_QTERMWIDGET This of course could be used inside the cpp file: #ifndef

How to create QtWebApp application

喜夏-厌秋 提交于 2019-12-11 19:37:10
问题 I'm trying to use QtWebApp to create a simple web app server, but it shows some error that i could not figure how to fix, any hint how to fix this? here's what i've done: = downloading QtWebApp-src.zip from http://stefanfrings.de/qtwebapp/ = compiling QtWebApp using qmake and make , completed successfully = create a new qwtest.pro , containing: QT += core network QT -= gui TARGET = qwtest CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cpp = create source file main.cpp ,

How to choose an iOS provisioning profile command line while using Qmake to build

ε祈祈猫儿з 提交于 2019-12-11 17:24:51
问题 I am building my QtApp command line for iOS with qmake command like so: qmake MyApp.pro -spec macx-ios-clang CONFIG+=iphoneos CONFIG+=device CONFIG+=$release But I am getting a code signing error after compilation succeeds: MyApp requires a provisioning profile. Select a provisioning profile for the "Release" build configuration in the project editor. Code signing is required for product type 'Application' in SDK 'iOS 10.3' The signing works if I choose the required provisioning profile from