Questions tagged [qmake]

`qmake`, part of the Qt framework, is a tool for generating Makefiles and IDE project files.

qmake, part of the Qt framework, is a multi-platform tool for generating GNU Makefiles, Microsoft Visual Studio project files, and Apple XCode project files from a common .pro project file.

Among other features specific to the Qt framework, qmake automates the process of running moc on source files that contain the Q_OBJECT macro.

qmake manual can be found here for Qt 4.8 and here for Qt 5.

1860 questions
0
votes
1 answer

How to copy or create a folder with specific files in build folder with QMAKE

In my projects folder i have a folder with the name translations where i have the translations files .ts. What i want Qt/QMake to do on run is to put on the build folder the translation with the correspondent .qm files. How can this be done?
Nmaster88
  • 1,405
  • 2
  • 23
  • 65
0
votes
1 answer

Qt Creator is unable to compile extern "C" block with C incompatible code

I'm using Qt Creator for a project in C++ and a few of the headers contain extern "C" blocks with function declarations that contain C incompatible code such as default parameters and the use of bool/true/false. I'm using Qt 5.11 on Ununtu…
Ankur Shah
  • 125
  • 12
0
votes
1 answer

How to load LIBS based on User name?

I want to run my program in two different machines and they have two different user names and different library paths. I want to define LIBS , INCLUDEPATH and DEPENDPATH based on user name detected from the environment variable in my Qt .pro file.…
rugi
  • 115
  • 5
0
votes
1 answer

Qt using "mingw32-make" in command line with .exe file generation error

I have used qmake -project and qmake in command line so far with the configuration of .pro file, Makefile.Debug and Makefile.Release has been worked out. But error happens when I try to use mingw32-make in command line to generate .exe for my…
Lee Dennis
  • 57
  • 6
0
votes
1 answer

Why qmake passes -Wl,O1 to gcc when linking and will it harm LTO?

I noticed that in the default release configuration, qmake (qmake 3.1, qt 5.9.5 - whatever is installed on my Ubuntu build box) passes -Wl,O1 to g++ when linking. So the linking command line looks like g++ -Wl,-O1 -flto -O2 -o program program.o…
Alexey B.
  • 1,106
  • 8
  • 17
0
votes
1 answer

Getting rid of QMAKE-generated makefile's output spam

If I would write makefile by hand , I can do something like this CXX = @g++ %.o: %.cpp makefile @echo Compiling $< ... $(CXX) -c $(FLAGS) $< This would hide the executed command (thanks to @) but leaves all diagnostic and…
Swift - Friday Pie
  • 12,777
  • 2
  • 19
  • 42
0
votes
0 answers

Linking graphviz libraries to C++ correctly

I am developping a program with QtCreator in which I use graphviz2.38. I have done a minimale example to explain. Just consider this small code which transform a dot file in svg file: #include #include #include…
froz
  • 163
  • 1
  • 12
0
votes
1 answer

How to configure qmake to save *.obj in subdirectories?

I have problem with build configuration.I get 'LNK2019' error: main.obj:-1: error: LNK2019: unresolved external symbol "public: __cdecl Reference::Item::Item(void)" (??0Item@Object@@QEAA@XZ) referenced in function main Filesystem structure for my…
Sonny D
  • 897
  • 9
  • 29
0
votes
1 answer

How to specify Libs variable of pkgconfig during its generation by qmake?

I want to set Libs: line via qmake .pro file and I try doing it like this: LIBS += -ldl to make my target executable be also linked with dl library because my library I am trying to link it with uses dl inside. However, this does not work, and…
VP.
  • 15,509
  • 17
  • 91
  • 161
0
votes
0 answers

QMake project files - selecting alternative compiler

The actual question: Does qmake support custom targets with different compilers (without using different qmake commands)? I am not planning to use the Qt library at all, only qmake for building. Some background Information: I have an existing…
KingofGamesYami
  • 345
  • 3
  • 12
0
votes
0 answers

Make source in Qmake project dependent on protocol buffers

I have a QT project building with make which makes use of Google's Protocol Buffers. The makefile resulting from the qmake appears to generate protoc commands which will create the desired source (*.pb.h, *.pb.cc), however the code which makes use…
2NinerRomeo
  • 2,687
  • 4
  • 29
  • 35
0
votes
2 answers

set C standard in qmake

For android purpose I am forced to use qmake instead of cmake. I can set C++ standard to C++11 using CONFIG += c++11 but I also have some C files which uses C11 . when I compile them I get errors like error: blahblah only allowed in C99 or C11…
user10146018
0
votes
1 answer

QMake ignore/edit project file variable

I want to reset LIBS variable of my project without touching pro file itself. qmake fileName.pro LIBS= this will not work, because "LIBS=" is performed before loading fileName.pro. cat fileName.pro | grep -v "LIBS.*=" | qmake /dev/stdin will not…
MetNP
  • 561
  • 5
  • 12
0
votes
1 answer

Defining a global macro for all projects in Qt project tree

Suppose, I have a project with structure like this: /project |--- root.pro |--- app | |--- app.pro | `--- ... (source files of app) |--- test | |--- test.pro | `--- ... (source files of test) The root.pro contains…
0
votes
0 answers

TCHAR setting in the Qt project

I am working with some legacy project which uses Qt 4. It is cross-platform, but I am interesting in its Windows part. I am trying to upgrade it for Qt 5, but I have faced with a problem. I have a lot of errors like: error: 'BOOL…
Lex Sergeev
  • 231
  • 1
  • 3
  • 17
1 2 3
99
100