Search Results

Search found 69 results on 3 pages for 'qmake'.

Page 1/3 | 1 2 3  | Next Page >

  • Escaping Hyphens with pkg-config through qmake

    - by Nexus
    I am trying to compile an application using qmake that is using pkg-config to bring in yaml-cpp. Unlike using pkg-config through the terminal qmake which is formatted like: pkg-config --libs --cflags yaml-cpp qmake actually spits out the include paths inside the make command like this: -I/usr/local/include/yaml-cpp This include path breaks subsequent includes which I've set in my qmake file. It's not possible for me to rearrange these includes due the order in which qmake parses its variables. Is it possible using qmake to escape the quote somehow or to make it use the first quoted configuration?

    Read the article

  • Find Microsoft SDK (psapi.lib) with Cmake and or qmake

    - by La Chamelle
    Hello, i have an application where is use Qt 4.6 and Microsoft SDKs (the Psapi.Lib). I use cmake or qmake to build. For qmake and cmake i specify in hard the path of the Psapi.lib. qmake : win32 { LIBS += "C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib\Psapi.Lib" } cmake : SET(PSAPI "C:/Program Files/Microsoft SDKs/Windows/v7.0A/Lib/Psapi.Lib") But i want to avoid the hard path, is there is any way to search the SDK lib ? For linux, there is no problem to search : qmake : unix { CONFIG += link_pkgconfig PKGCONFIG += xmu } cmake : IF(UNIX) INCLUDE(FindPkgConfig) PKG_CHECK_MODULES(XMU xmu REQUIRED) INCLUDE_DIRECTORIES(${XMU_INCLUDE_DIR}) LINK_DIRECTORIES(${XMU_LIBRARY_DIRS}) ENDIF() It's possible to make the same ? Thanks you.

    Read the article

  • qt qmake mkspecs relative path

    - by Fabien Bernede
    Hello, when I compile Qt with Windows SDK 7.0, I use : configure.exe -shared -platform win32-msvc2008 -ltcg -no-dsp -no-vcproj nmake ...no error occured. But when I move or change name of my Qt folder, qmake.exe said me makespec is not defined, so I configure my QMAKESPEC to win32-msvc2008, I try again, but now it said me it cannot find mkspecs folder, it try to find this folder only where I compiled Qt (absolute path), I want qmake.exe use relative path : ../mkspecs/ not C:\qt-4.6.2\mkspecs. How can I solve this issue ?

    Read the article

  • Identifier for win64 configuration in Qmake

    - by Tuminoid
    Is there a "win64" identifier in Qmake project files? Qt Qmake advanced documentation does not mention other than unix / macx / win32. So far I've tried using: win32:message("using win32") win64:message("using win64") amd64:message("using amd64") The result is always "using win32". Must I use a separate project-file for x32 and x64 projects, so they would compile against correct libraries? Is there any other way to identify between 32-bit and 64-bit environments?

    Read the article

  • Qmake does not specify a valid qt

    - by Comptrol
    After installing Qt SDK for Open Source C++ development on Mac OS by following the respective steps Note for the binary package: If you have the binary package, simply double-click on the Qt.mpkg and follow the instructions to install Qt. . Yes, that is all I have done to install Qt on MacOsX. Everything was going fine, until I run a sample application, of which compile output resulted in: No valid Qt version set. Set one in Preferences Error while building project qtilk When executing build step 'QMake' Canceled build. Then I tried to change the respective Qt version in Preferences and I hovered over the Path, I realized my mkspec isn't set: Then I tried querying qmake by qmake -query : QT_INSTALL_PREFIX:/ QT_INSTALL_DATA:/usr/local/Qt4.6 QT_INSTALL_DOCS:/Developer/Documentation/Qt QT_INSTALL_HEADERS:/usr/include QT_INSTALL_LIBS:/Library/Frameworks QT_INSTALL_BINS:/Developer/Tools/Qt QT_INSTALL_PLUGINS:/Developer/Applications/Qt/plugins QT_INSTALL_TRANSLATIONS:/Developer/Applications/Qt/translations QT_INSTALL_CONFIGURATION:/Library/Preferences/Qt QT_INSTALL_EXAMPLES:/Developer/Examples/Qt/ QT_INSTALL_DEMOS:/Developer/Examples/Qt/Demos QMAKE_MKSPECS:/usr/local/Qt4.6/mkspecs QMAKE_VERSION:2.01a QT_VERSION:4.6.2 QMAKE_MKSPECS seems to be set here?? Will setting my mkspec solve my building problem? I tried setting by typing export mkspec=macx-g++. Still, mkspec seems not to be set to anything. I am all ears waiting for your answers. Thanks in advance.

    Read the article

  • How to generate .sln/.vcproj using qmake

    - by stas
    Hi! I have main.cpp in c:\test folder and do the following: qmake -project qmake -tp vc test.pro The answer is: WARNING: Unable to generate output for: C:/test//Makefile.Debug [TEMPLATE vcapp] WARNING: Unable to generate output for: C:/test//Makefile.Release [TEMPLATE vcapp] But, I don't need make files. I need .vcproj! Environment: Windows XP Pro SP3, MSVC 7.1 and 8.0. Qt is installed in C:\Qt\2010.02 (LGPL version). Commands are run from Qt Command Prompt. What's wrong with it? How to generate .sln/.vcproj? May I generate them for MSVC 7.1 and 8.0?

    Read the article

  • How to add flags to RC.EXE through QMake .pro makefiles

    - by Hernán
    I've the following definition in my .pro file: RC_FILE = app.rc This RC file contains a global include at the top: #include "version_info.h" The version_info.h header is on a common header files directory. Since RC.EXE takes INCLUDE environment variable in consideration, according to MS documentation, my build process batch sets up that accordingly: SET INCLUDE=%PROJECTDIR%\version;%INCLUDE% ... QMAKE project.pro -spec win32-msvc2008 -r CONFIG += release This works perfect as RC seems to read that INCLUDE var so the "version_info.h" file is including on every RC file properly. The problem is when I generate a VS solution (or Import it through the VS Addin). The RC invocation does not contain any /I flag (as I expect) but does not read any INCLUDE variable, even when I've setup through system 'environment variables' dialog in XP. So I'm stuck with this problem, with two alternatives I could not get to work: Make VS RC.exe invocation honour the INCLUDE variable (didn't work either as user or system variable). Force QMAKE to pass /I flag to RC invocation, and get that /I flag imported into the project settings (Resource Compiler properties). Thanks in advance.

    Read the article

  • qmake -project command gives QFileInfo warning in Qt 4.6

    - by Pilgrim
    I've upgraded to Qt 4.6 on my Mac (OS 10.5). When I go to a project directory and run: qmake -project Qt returns this warning (although it doesn't say it's a warning, I assume it is since the .pro file gets created anyway): QFileInfo::absolutePath: Constructed with empty filename I did a completely new install thinking that the "upgrade" wasn't clean for whatever reason, it still does it. Any ideas as to why? Here is an example .pro that results from above command: ###################################################################### # Automatically generated by qmake (2.01a) Mon Apr 19 07:39:53 2010 ###################################################################### TEMPLATE = app TARGET = DEPENDPATH += . INCLUDEPATH += . # Input HEADERS += mainwindow.h SOURCES += main.cpp mainwindow.cpp RESOURCES += jquery.qrc

    Read the article

  • qmake library reordering

    - by user1095108
    I put this into a qmake file: QTPLUGIN += component LIBS += -L../lib -lmodule -lcomponent -lnetworking But qmake reorders the libraries behind my back: g++ -m64 -Wl,-O1,--sort-common,--as-needed,-z,relro -o testb .obj/constants.o .obj/main.o .obj/qrc_application.o -L/usr/lib -L../lib -lmodule -lnetworking -lcomponent -lQtGui -lQtNetwork -lQtCore -lpthread Probably because component is a static plugin. But it has a static dependency on the networking library and hence the reordering causes a link error. It is a static dependency and hence is ok in my opinion. How to work around this? I'm using qt 4.8.1.

    Read the article

  • qmake and multiple MSVS versions

    - by goodrone
    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), MSVC.NET 2008 (9.0) in path, MSVC.NET 2008 Express Edition (9.0) in path) For this project I use MSVS 2008 Professional. Actually the generated .vcproj file works well, but what is the warning message about?

    Read the article

  • How to specify different Debug/Release output directories in QMake .pro file

    - by esavard
    I have a Qt project and I would like to output compilation files outside the source tree. I currently have the following directory structure: / |_/build |_/mylib |_/include |_/src |_/resources Depending on the configuration (debug/release), I will like to output the resulting files inside the build directory under build/debug or build/release directories. How can I do that using a .pro file?

    Read the article

  • Qmake project dependencies (linked libraries)

    - by Stick it to THE MAN
    I have a project that links to a number of shared libraries. Lets say project A depends on projects B and C Ideally, I want to impose the following dependencies in my project file: Rebuild project A if either B or C has been rebuilt since last time project A was built Use the output for the relevant configuration (i.e. if building project A in debug mode, then use the debug versions of the libs for project B and C) Does anyone know how I may explicitly express such dependencies in my project file?

    Read the article

  • qmake translations doesn't seem to work

    - by gordebak
    I have a Qt app with a Czech translation. I can get my translation compiled and installed fine with the following code. But when I run the app, translation doesn't work. What am I missing? I even tried to chmod 644 to change the permissions of the translation file, but it didn't work either. Thanks in advance. TRANSLATIONS += cs_CZ.ts isEmpty(QMAKE_LRELEASE) { win32|os2:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease unix { !exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt4 } } else { !exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease } } } updateqm.input = TRANSLATIONS updateqm.output = qm/${QMAKE_FILE_BASE}.qm updateqm.commands = $$QMAKE_LRELEASE -silent ${QMAKE_FILE_IN} -q qm/${QMAKE_FILE_BASE}.qm updateqm.CONFIG += no_link target_predeps QMAKE_EXTRA_COMPILERS += updateqm INSTALLS += translations translations.path = /usr/share/app translations.files = qm/cs_CZ.qm

    Read the article

  • SGE: invoking qmake raises "critical error: can't resolve group"

    - by Pierre
    I'm new to SGE an I'm trying to run qmake with the simple following Makefile with our very new cluster: merge.txt: job1.txt job2.txt job3.txt ... cat $^ > $@ job1.txt: sleep 1 echo "Hello From " $@ > $@ sleep 1 job2.txt: sleep 2 echo "Hello From " $@ > $@ sleep 2 job3.txt: (...) the following command raises an error: qmake -l arch=lx24-amd64 -cwd -v PATH -- -j 4 sleep 1 dynamic mode sleep 2 dynamic mode sleep 3 dynamic mode sleep 4 dynamic mode critical error: can't resolve group qmake: *** [job3.txt] Error 1 critical error: can't resolve group qmake: *** [job2.txt] Error 1 critical error: can't resolve group qmake: *** [job1.txt] Error 1 critical error: can't resolve group what's wrong ?

    Read the article

  • Resources needed: basics of using make/qmake

    - by Mikey
    I am look for a good book or website that clearly explains the basics of using make, (particularly qmake for Qt development) makefiles, etc. for building C++/Qt executables. I am using open source tools on Ubuntu. Lately have been doing a lot of Qt/C++ development using the CodeLite IDE, which works quite well with Qt, however when I wanted to write my own QObject derivatives with custom signal and slots, I discovered I had to use qmake and I don't know how. (Meanwhile I have been using QtCreator, which handles this, but it not my IDE of choice) I have several books on C++ and Qt but I haven't found that they focus at all on this area. Recommendations please...

    Read the article

  • How do I enforce the order of qmake library dependencies?

    - by James Oltmans
    I'm getting a lot of errors because qmake is improperly ordering the boost libraries I'm using. Here's what .pro file looks like QT += core gui TARGET = MyTarget TEMPLATE = app CONFIG += no_keywords \ link_pkgconfig SOURCES += file1.cpp \ file2.cpp \ file3.cpp PKGCONFIG += my_package \ sqlite3 LIBS += -lsqlite3 \ -lboost_signals \ -lboost_date_time HEADERS += file1.h\ file2.h\ file3.h FORMS += mainwindow.ui RESOURCES += Resources/resources.qrc This produces the following command: g++ -Wl,-O1 -o MyTarget file1.o file2.o file3.o moc_mainwindow.o -L/usr/lib/x86_64-linux-gnu -lboost_signals -lboost_date_time -L/usr/local/lib -lmylib1 -lmylib2 -lsqlite3 -lQtGui -lQtCore Note: mylib1 and mylib2 are statically compiled by another project, placed in /usr/local/lib with an appropriate pkg-config .pc file pointing there. The .pro file references them via my_package in PKGCONFIG. The problem is not with pkg-config's output but with Qt's ordering. Here's the .pc file: prefix=/usr/local exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: my_package Description: My component package Version: 0.1 URL: http://example.com Libs: -L${libdir} -lmylib1 -lmylib2 Cflags: -I${includedir}/my_package/ The linking stage fails spectacularly as mylib1 and mylib2 come up with a lot of undefined references to boost libraries that both the app and mylib1 and mylib2 are using. We have another build method using scons and it properly orders things for the linker. It's build command order is below. g++ -o MyTarget file1.o file2.o file3.o moc_mainwindow.o -L/usr/local/lib -lmylib1 -lmylib2 -lsqlite3 -lboost_signals -lboost_date_time -lQtGui -lQtCore Note that the principle difference is the order of the boost libs. Scons puts them at the end just before QtGui and QtCore while qmake puts them first. The other differences in the compile commands are unimportant as I have hand modified the qmake produced make file and the simple reordering fixed the problem. So my question is, how do I enforce the right order in my .pro file despite what qmake thinks they should be?

    Read the article

  • qmake error when trying to build qwbfs

    - by speedox
    I'm trying to install qwbfs application but when i enter the command : make i get this: tools.c:8:25: fatal error: openssl/md5.h: No such file or directory compilation terminated. make[1]: *** [../build/release/obj/unix/tools.o] Error 1 make[1]: Leaving directory `/home/speedox/qwbfsmanager-1.2.2-src/libwbfs' make: *** [sub-libwbfs-make_default-ordered] Error 2 can you please tell me where is the problem. thanks in advance,

    Read the article

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

    - by Dan O
    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 extends a class (Bar) from core) in another project (not a lib) I get the following linking error: /usr/bin/ld: Undefined symbols: Bar::Bar() Basically, the linker cannot find the class in the core lib that has been derived in the foo lib, but ONLY when I instantiate the class in a third project that is using both libs. Is this behaviour expected? Regards, Dan O Update: I fixed it by directly invoking the Bars constructor in the third project before using derived class... does anyone know why I need to do this?

    Read the article

  • Configuring gcc compiler switches in Qt / QtCreator / QMake

    - by andand
    I recently tried to use Qt Creator 1.3.2 / Qt 4.6.2 / gcc 4.4.0 (32-bit version) on Windows 7 (64-bit) to compile an application using some of the experimental C++0x extensions and encountered the following (fatal) error: This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options. In my search for a solution, I came across this thread, and added the following to the .pro file: CXXFLAGS += -std=c++0x but that didn't seem to make a difference. So, I expect there's some tag I need to add to the .pro (project) file, but I've never messed with the gcc compiler switches in Qt / QMake / QtCreator before, and am uncertain about the proper invokation / incantation. So, my question is how do you set gcc compiler switches when using QtCreator / QMake / Qt?

    Read the article

  • QMake et au-delà : le futur de l'outil de compilation de Qt, un article de Marius traduit par Louis

    Bonjour, QMake est un outil qui simplifie grandement le processus de compilation pour de différentes plateformes. Son prédécesseur était un script Perl nommé TMake, qui, dépassé, avait vite été remplacé par le QMake que nous connaissons. Aujourd'hui, ce dernier semble à son tour ne plus apporter une réponse au besoin initial, étant devenu difficile à maintenir. Ainsi, devant la diversité et le nombre des avis internes, Marius a décidé de rédiger un article dans les Qt Labs Blogs afin de demander aux développeurs aguerris leur avis sur la question. Qu'allons-nous faire de QMake ? C'est la question, posée par Marius en début...

    Read the article

  • Build automation: Is it usual to use QMake for non-Qt projects?

    - by Raphael
    So, I'm planning to write a C++ library and I want it to be cross-platform, and as this library won't deal with UI and I want it to have as little dependencies as possible, I won't be using Qt (actually Qt won't really help me to achieve what I want, all I plan on using is STL and Boost). Now when it comes to build a cross-platform project, I really like QMake as it's extremely easy to use and I have experience with it. I also heard good things about CMake, though I really doubt it's as easy to use as QMake. Anyway, here is my question: Should I stick with build automation tool that I know or is QMake just out of context for a non-Qt project? Should I take this as an opportunity to learn CMake? Or is there a better alternative to these two?

    Read the article

  • Developing Qt applications in Unix systems using Qt Creator

    - by Jake Petroules
    I'm developing a Qt application in Linux using Qt Creator (2.1 RC). I've created 2 projects, and used the wizard to add the library project to the application project. However when I run it, I receive the error: /home/jakepetroules/silverlock/silverlock-build-desktop/desktop/silverlock: error while loading shared libraries: libsilverlocklib.so.1: cannot open shared object file: No such file or directory Is there some qmake variable I can set so that Qt Creator will set up the environment properly to run? It's quite annoying to have to copy all the files to another directory with a launcher script just to be able to test the build. On Windows it works perfectly - Qt Creator automatically adds the directories containing the DLLs to the PATH when it runs your application (where running it from Explorer would say DLL not found). Mac OS X is even worse, having to run install_name_tool on everything... So how can I set up my qmake files so everything works right from the run button in Qt Creator? Kind of hard to debug without this ability, too.

    Read the article

  • Qt MOC Filename Collisions using multiple .pri files

    - by Skinniest Man
    In order to keep my Qt project somewhat organized (using Qt Creator), I've got one .pro file and multiple .pri files. Just recently I added a class to one of my .pri files that has the same filename as a class that already existed in a separate .pri file. The file structure and makefiles generated by qmake appear to be oblivious to the filename collision that ensues. The generated moc_* files all get thrown into the same subdirectory (either release or debug, depending) and one ends up overwriting the other. When I try to make the project, I get several warnings that look like this: Makefile.Release:318: warning: overriding commands for target `release/moc_file.cpp` And the project fails to link. Here is a simple example of what I'm talking about. Directory structure: + project_dir | + subdir1 | | - file.h | | - file.cpp | + subdir2 | | - file.h | | - file.cpp | - main.cpp | - project.pro | - subdir1.pri | - subdir2.pri Contents of project.pro: TARGET = project TEMPLATE = app include(subdir1.pri) include(subdir2.pri) SOURCES += main.cpp Contents of subdir1.pri: HEADERS += subdir1/file.h SOURCES += subdir1/file.cpp Contents of subdir2.pri: HEADERS += subdir2/file.h SOURCES += subdir2/file.cpp Is there a way to tell qmake to generate a system that puts the moc_* files from separate .pri files into separate subdirectories?

    Read the article

  • Change Qt install path after building ?

    - by Fabien Bernede
    Hello, how can I change Qt install path after I building it ? Example : qmake.exe search binaries to original install path, how can I change/redefine it ? Thanks. Edit : I finally found this patch to apply to Qt : http://ftp-developpez.com/qt/binaires/win32/patcher/QtPatcher.7z http://ftp-developpez.com/qt/binaires/win32/patcher/QtPatche_src.7z

    Read the article

  • Building 64bit Qt on 32bit Xp computer

    - by photo_tom
    I'm trying to build Qt in a shared 64 bit mode on my 32bit XP system. I can configure the QMake and start the 64bit build. The problem is that when the build starts, the first thing that happens in that the process builds ui, moc and rcc utility compilers in 64 bit mode, then tries to run them on my 32bit machine. Does anyone know how to configure the build so that it does not build those compilers first?

    Read the article

1 2 3  | Next Page >