problem about qmake-Collection of common programming errors
oracal
c++ qt plugins qmake mingw32
I have been trying to use QCA (Link) on my Windows PC for a couple of days now, works fine on my linux box, just can’t get it working with Windows.So i followed all the instructions for installing QCA and then the ossl plugin for QCA. The QCA works fine but for some reason the plugin isn’t showing up in my Qt Creator nor am I able to use some of the functions in the plugin.I used the qcatool2.exe that comes with QCA to check my plugins usingqcatool2
James Oltmans
qt qmake
I’m getting a lot of errors because qmake is improperly ordering the boost libraries I’m using.Here’s what .pro file looks likeQT += core guiTARGET = MyTarget TEMPLATE = appCONFIG += no_keywords \link_pkgconfigSOURCES += file1.cpp \file2.cpp \file3.cppPKGCONFIG += my_package \sqlite3LIBS += -lsqlite3 \-lboost_signals \-lboost_date_timeHEADERS += file1.h\file2.h\file3.hFORMS += mainwindow.uiRESOURCES += Resources/resources.qrcThis produces the following command:g++ -Wl,-O1 -o MyTarget file1.o file2.o file3.
OHTO
c++ qt linker cmake qmake
I converted a project from qmake (Initially I used qt-creator to build it on mac/linux/win) to cmake and I get a lot of link errors.For example:Undefined symbols for architecture x86_64:”runion(QtRegion const&, QtRegion const&)”, referenced from:Q3DView::ReloadLineData() in 3DView.cpp.o”pafrand(int)”, referenced from:My .pro file:CONFIG += debug_and_release QT += core gui opengl DEFINES += _TEST1 TEMPLATE = app TARGET = test HEADERS = xxx.h \xxxxxx.h \etc.hLibs/include/generic/xxxxxx.hSOURCES = xxxx.cpp \xxx.cpp \xxxx.cpp INCLUDEPATH += Libs/include INCLUD
L123
qt assembly qt-creator qmake
I am using Windows XP, and Newest Qt Creator with QtSDK and the built-in gcc compiler.The question is, how to use full assembly in a C++ Qt Project. I know how to use inline assembly, but I don’t know how to do non-inline(written in a separate .asm file) full assembly, in a Qt C++ project.Is this possible with a Qt C++ project, and if so, how?EDIT:*pro file TEMPLATE = app CONFIG += console CONFIG -= qtSOURCES += \calc.Scalc.Ssection .datahello: db ‘Hello world!’, 10helloLen: equ $-hel
Haroogan
c++ qt linker qmake qobject
Here is a sample qt code that is copied from qt documentation site.#include #include #include #include #include #include #include #include #include #include #include #include #include class QSslError;QT_USE_NAMESPACEclass DownloadManager: public QObject {Q_OBJECTQNetworkAccessManager manager;QList currentDownloads;public:DownloadManager();void doDownload(const QUrl & url);QString saveFileName(const QUrl & url);bool saveToDisk(const QString & fileName, QIODevice *data);virtual ~DownloadManager();public slots:void execute();void downloadFinished(QNetworkReply *reply);void sslErrors(const QList & errors);};DownloadManager::~DownloadManager() {}DownloadManager::DownloadManager() {connect(&manager, SIGNAL(finished(QNetworkReply*)), SLOT(downloadFinished(QNetworkR
cmannett85
qt gcc mingw qmake
I am getting linker failures under MinGW, however I cannot see why. This is the link command:g++ -shared -mthreads-Wl,–out-implib,C:\Users\camm\Syren\libs\libSy_polyMesh.a -o C:\Users\camm\Syren\libs\Sy_polyMesh.dll debug/Sy_polyMesh.o debug/moc_Sy_polyMesh.o debug/qrc_Sy_polyMesh.o -L”c:\Qt\4.8.4\lib”-lglu32 -lopengl32 -lgdi32 -luser32 -LC:\Users\camm\Syren/libs -lSyren -lglew32 -lboost_system -lQtSvgd4 -lQtSqld4 -lQtOpenGLd4 -lQtGuid4 -lQtCored4The undefined reference errors come from the Syren dll (I should state the command was automatically generated by qmake). The -LC:\Users\camm\Syren/libs looks malformed to me because of the mix of forward
Los Frijoles
c++ gcc static-linking qmake boost-regex
I am writing a static library for use in a couple projects using the Qt build system. While the library itself doesn’t use Qt, the applications using it will use Qt and I wanted to use Qt creator for all of them to keep them in one place.I am using regular expressions in this library and since I was already using boost for smart pointers and a couple other things it made sense to use Boost.Regex as well. The following code appeared initially to compile normally (this is located in some code going into the static library):#include boost::shared_ptr SimulationCore::load(const std::string &fileName) {//go through the list of file loaders and the first one to match gets to load ittypedef std::pair LoaderRecord;boost::shared_ptr loader;BOOST_FOREACH(LoaderRecord loaderRecord, this->fileLoaders){boost::regex r(loaderRecord.first);if (boost::regex_match(fileName, r)){loader = loaderRecord.second;break;}}//etc….However, when linking this library with my testing project (which is a console application), I got the following errors:/home/kcuzner/Projects/Qt/Simulate/Tests/../lib//libEngine.a(simulationcore.o): In func
jalone
c++ osx shared-libraries qmake
i have a working cmake project that i need to move to qmake.Everything is working but the include of a library called octomap.I installed ( sudo make install ) octomap in system/usr/local/lib/liboctomap.a /usr/local/lib/liboctomap.dyliband the headers in /usr/lo
Esa
windows qt-creator qmake
I like the environment, especially as I got hit by the VS MSBuild bug. Basically, QT -= gui core # No qt is usedyet, when I try to compile, I get the following error:c:\QtSDK\Desktop\Qt\4.7.3\mingw\lib\libqtmaind.a(qtmain_win.o):-1: In function `WinMain@16′: c:/ndk_buildrepos/qt-desktop/sr
user1203141
c++ qt makefile g++ qmake
Im helping on a c++ application. The application is very large and is spread out between different sub directories. It uses a script to auto generate qt .pro files for each project directory and uses qmake to th
Dan O
c++ linker static-libraries qmake
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 ex
Haroogan
qt mingw qmake log4cxx
It’s the second day I’m trying to marry Qt5, MinGW and log4cxx.Even after I’ve compiled everything successfully, linked apr, apr-util and log4cxx libraries – gcc gives me a bunch of “undefined reference” problems.It looks like different settings were specified during log4cxx compilation (I’m using ant). Was anyone able to successfully compile and use log4cxx in Qt?[Added later] Environment:log4cxx trunk apr 1.4.6 apr-util 1.5.2 latest MinGW I’m using QT5 with latest MinGW as a compilerWhat I’ve done:compiled log4cxx using ant with the following command: “ant -Dcompiler=gcc -Dfind=false -DLO
elephantintheroom
c++ qt opencv static-libraries qmake
I’m currently trying to play around with OpenCV but I ran into a bit of trouble.. I use the qt ide with mingw to compile my applications.My code looks like this: #include “highgui.h”int main( int argc, char** argv ) {IplImage* img1 = cvLoadImage( argv[1] );cvNamedWindow( “Example”, CV_WINDOW_AUTOSI
Ondrej Fabry
c++ qt cmake qmake wt
I am working on a network management application with Qt and I chose to use Wt for UI, because with it I will not have to deal with any of web parts (PHP, AJAX, HTML/CSS) and it’ll be usable on all platforms.I successfully managed to compile and run examples using cmake. Although I am used to QtCreator IDE and qmake I would rather use that for development and compiling. I got stuck trying to compile “wtwithqt” example in QtCreator(qmake). I’ve been searching everywhere for some guide how to compile it with qmake. However I found nothing helpful.Here is my .pro file.testWt.proQT += core QT -= guiTARGET = helloqt CONFIG += console no_keywords CONFIG -=app_bundleTEMPLATE = appINCLUDEPATH += libLIBS += -lwt -lwthttp -lboost_signals -lboost_system -lboost_regexQMAKE_CXXFLAGS += -DNDEBUGHEADERS += \QtObject.h \HelloApplication.hSOURCES += \hello.cpp \QtObject.cppCompile ouput13:28:15: Running build steps for project testWt… 13:28:15: Starting: “/usr/bin/make” clean -w make: Entering directory `/home/nms-development/QtProject/testWt-build-desktop-Qt_4_8_1_in_PATH__System__Debug’ /usr/bin/qmake-qt4 -spec /usr/share/qt4/mkspecs/linux-g++ CONFIG+=debug CONFIG+=declarative_debug -o Makefile ../testWt/testWt.pro make: Leaving directory `/home/nms-develo
Guilherme Nascimento
c++ qt mingw qmake hunspell
I’m trying to use hunspell with QtWebKit in Windows (using mingw4.8)I did download these files:QtWekibt-plugins:https://github.com/QupZilla/qtwebkit-plugins/hunspell:http://downloads.sourceforge.net/hunspell/hunspell-1.3.2.tar.gzBut I can not properly set the directory location of the hunspell lib.LIBS += -lhunspellI tried adding the main folder of the project, tried to add the folder “src”, but both cause the following error:error: cannot find -lhunspellI tried doing this:LIBS += -LC:/Users/cr/Desktop/QT/qtwebkit-plugins-master/src/hunspellbut this error occurs:C:\Users\cr\Desktop\QT\qtwebkit-plugins-master\src\spellcheck\speller.cpp:57:error: undefined reference to Hunspell::Hunspell(char const*, charconst*, char const*)see all errors that occur in the following image:[update 1]I try:LIBS += -LC:/Users/cr/Desktop/QT/qtwebkit-plugins-master/src/hunspell -lhunspellreturn error:error: [Makefile] Error 3[update 2]I try this:HEADERS = $$PWD/hunspell/affentry.hxx \$$PWD/hunspell/affixmgr.hxx \$$PWD/hunspell/atypes.hxx \$$PWD/hunspell/baseaffix.hxx \$$PWD/hunspell/csutil.hxx \$$PWD/hunspell/dictmgr.hxx \$$PWD/hunspell/filemgr.hxx \$$PWD/hunspell/hashmgr.hxx \$$PWD/hunspell/htypes.hxx \$$PWD/hunspell/hunspell.h \$$PWD/hunspell/hunspell.hxx \$$PWD/hunspell/hunzip.
Mat
qt linker 32-bit qmake
ive been googling the net for hours now and still didnt came up with a solution to my problem, so i hope that you guys can help me. Im trying to add external libraries to my Qt Project (4.7.4 32-bit). I’m working with the CV-Software Halcon (x86-win32) and want to link the example test project (matching.pro) to the halconcpp.lib and halcon.lib inside the lib folder of Halcon. So i adde
Bart
c++ wxwidgets qmake
I’m trying to compile a GUI program based on the wxWidgets libraries. I get a lot of undefined references to “something”. I tried to add a few libraries manually on the LIBS variable of QMake without success. How ca
Grizzly
c++ boost mingw qmake
I’m tryin to use boost threads on mingw (TDM-mingw, 32bit based on gcc4.6) from qtcreator using qmake. I managed to compile boost 1.4.7 usingbjam –toolset=gcc –layout=tagged –without-mpi –without-python -j 4 stage –build-type=completeHowever I simply can not get it to link. I tried to link against several of the libboost_thread libraries created (libboost_thread.a, libboost_thread-mt.a, libboost_thread-mt-dll.a, libboost_thread-mt-s.a), however it always ends up giving me ld.exe: warning: cannot find entry symbol nable-stdcall-fixup; defaulting to 00401000 main.o:main.cpp:(.text.startup+0x76): undefined reference to `_imp___ZN5boost6thread12start_threadE
robw
windows qt linker mingw qmake
I’m trying to link my QT application to a DLL (libshout), while building for Windows.I’ve added the appropriate lines to my .pro file:LIBS += -L/local/lib -lmp3lame LIBS += -L/local/lib -lshout LIBS += -L/local/lib -logg LIBS += -L/local/lib -lvorbis LIBS += -lwsock32I’ve also successfully built and installed libshout to /local/lib (I’m using mingw and the gcc-dw2 compiler).However, qmake fails to link successfully. I’ve pasted the gcc/make output below. I’m not even sure it’s trying to link to the right library (isn’t .a/.la a static library?). I’ve been tearing my hair out for 3 days over this one so any help appreciated :)g++-dw2 -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPP ORT -DQT_DLL -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CO RE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I’../../Qt/4.6.3/include/QtCore’ -I ‘../../Qt/4.6.3/include/QtNetwork’ -I’../../Qt/4.6.3/include/QtGui’ -I’../../Qt/ 4.6.3/include/QtWebKit’ -I’../../Qt/4.6.3/include’ -I’../../Qt/4.6.3/include/Act iveQt’ -I’release’ -I’../../Qt/4.6.3/mkspecs/win32-g++’ -o release/qrc_resources .o release/qrc_resources.cpp g++-dw2 -enable-std
Aymeric Larose
gcc make static-libraries qmake portaudio
I’m trying to use the static library from portaudio by putting “libportaudio.a” in my project after compiling portaudio (by doing “./configre && make” and then i took the file in lib/.libs/).As this is a qt project, my Makefile Lib line look like this: LIB
Mike
c++ qt windows-7-x64 qmake undefined-reference
Ok. I just installed Qt from: http://qt.nokia.com/downloads using the online installer. I have MinGW, make, gcc and g++ installed. I also added variables QMAKESPEC and QTDIR and also appended the directories in MinGW and Qt to the PATH variable. Whe
karlphillip
c++ qt opengl opencv qmake
I have compilation problems when I’m using the createOpenGLCallback. I’ve got the follow error message:undefined reference to `cv::createOpenGLCallback(std::basic_string
Originally posted 2013-11-09 23:10:32.