qmake

How to build qt out of source

hello the question goes as the title. I was searching a lot through qt forums and google the last couple of days. There is no obvious answer to this question , and maybe not at all. I found the -prefix (not even documented on windows) option that can be supplied to configure to specify different install directory , but this is not clea...

GNU make --jobs option in QMAKE

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 ...

Prepend/Append Makefile to a QT generated Makefile

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 ther...

Header dependencies in qmake using MSVC Express

Hi, I'm using QtCreator on windows using MSVC compiler (the compiler from Visual c++ express edition) and qt 4.5.2 open source. When I modify a header on the project and press build all, nothing is actually built, only If I modify a .cpp file the modified cpp is compiled. That causes that every time that I have to change some header f...

Exporting Qt stylesheets to output dir

Hi, I'm using a stylesheet in my Qt desktop application (a .qss file), but I can't find out how to make the .pro file copy the .qss file to the output directory (where the .exe file is being created), which means the application runs totally without any styling. I used to run the project from Visual Studio, and VS would take care of al...

qt moc.exe not generating *.moc file

Hi, I'm trying to build the qtestlib/tutorial1 example, but the testqstring.moc file isn't being generated when I run nmake (I'm running QT 4.5.2 on Windows XP SP3). I copied testqstring.cpp from the tutorial directory to my build directory (C:\sandboxes\testqstring) and from the QT command prompt ran vsvars32.bat file from my MS Visual ...

Why does Qt use it's own make tool, qmake?

I just started using Qt and noticed that it uses it's own make tool, qmake. Why does Qt use its own make tool? Is there something special that prevents it from using a standard make tool? Does qmake call the GCC C++ compiler? ...

How to use QMake's subdirs template?

Hi, I'm starting to learn Qt. I'm moving from the Visual Studio world and I am looking for a way to organize my project's structure using QMake. I've found the 'subdirs' template but I have quite a hard time understanding it. My project structure looks like this: project_dir/ main.cpp project.pro logic/ logic.pro ...

qmake and multiple MSVS versions

From Visual Studio 2008 Command Prompt I run this command to generate .vcproj file: >qmake -spec win32-msvc2008 And get a warning message: WARNING: Generator: MSVC.NET: Found more than one version of Visual Studio in your path! Fallback to lowest version (MSVC.NET 2008 (9.0), MSVC.NET 2008 Express Edition (9.0), MSVC.NET 2005 (8.0), ...

Variables that persist across .pro files from a subdirs pro file

Greetings, I've got a .pro file that looks like: TEMPLATE = subdirs SUBDIRS = foo bar I want to set a variable, or define, or something in my subdirs .pro file that can be read in both the foo and bar .pro files. I've tried to set an environment variable with: export TEST=something but that does not work, message($$(TEST)) always...

Static lib that links another static lib and qmake? Odd linking error

I have two qt .pro files, both using the lib TEMPLATE and staticlib CONFIG. The first library (lets call it 'core') is a dependency for the second lib (I'll call it 'foo'). In fact, there's a class in foo that extends a class in core, I will call this class Bar. When I instantiate the class (which is defined and implemented in foo, but ...

How to format/change qmake build output

Hello, how can I format the make output (!!by only changing the qmake project file!!). My compilation lines continue growing, and the one-line-warnings/errors almost disappear between them. I am thinking of something like $(CC) in.ext -o out.ext thanks in regard ...

what is use of makefile ?

what is the purpose of makefile, .pro file . ...

Retrieve revision number in VS with qmake

My current workflow: hg update (or whatever one uses to check out a revision) MyProject.pro → qmake → MyProject.vcproj Open Visual Studio, edit files Build project During the build step, how can I update my config.h header file with information from version control system (e.g. hg id)? MyProject.vcproj is generated by qmake, so I sh...

How do I use qmake to build multiple binaries in a single project?

I'm writing a small qt app suite that consists of a set of small programs that work on the same set of files. They are organized like this: / app1/ main.cpp app2/ main.cpp app3/ main.cpp common/ project.h project.cpp somemore.h somemore.cpp appsuite.pro When I do qmake && make, I want the follow...

How to build Qwt on Windows

Here's what I've done: Downloaded qwt-4.2.0-setup-qt230nc.exe from sourceforge Unpack to C:\Program Files\Qwt Go to Qt Command Prompt Run msvc-qmake.bat. Get the output. Now the lib directory is created, but it's empty. Also tried opening VS project file, but it doesn't converse to VS2008, because there are no vcproj files. I also...

strange QT error when using with openssl

hi all I have successfully linked my QT application with openssl and I can use it in my application now. But qmake makes an strange error when it reaches my openssl function use(it seems to be a compile one,but it is even shown in error list like normal ones): make[1]: *** [\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\Pir\Carbide\...

How to make qmake compile multiple cross platform binaries

I'm using QT Creator on a project and was wondering if there's a single command to compile the project to a Mac, Windows, & Linux binaries so I can easily send them to other computers for testing without having to send over the whole source code. Currently I'm running the QT Creator on Mac OSX if that matters. ...

How to execute external programs from qmake?

I am trying run a program from a qmake .pro file which modifies the final binary. I have already tried system(...) but it does not work. The reason I want this is because by default some properties of the binary prevent debugging and it is inconvenient to do it manually every time. I can do this from simple makefiles. Here is my .pro fi...

qmake: How do I copy .dll/.so's to the output directory?

I have a Qt-project that builds a dll/shared-library and another Qt-project that tests the library. Is there any good way to have qmake copy the dll to the output-folder of the test-project? ...