[SOLVED] Compilation problems in environment with Qt 4.8 and 5.1
-
Hi,
Are you sure your project is using the right kit ?
-
Thanks for the quick reply!
I think I am... I had to add the kit manually though, after installing 4.8. All I did was add Qt 4.8 as a version manually and create a new kit using this version. Is that enough?
Here's a screenshot of the kit I'm using to compile the project:
-
Those are general Qt Creator settings. You need to modify settings for your specific project: click on "Project" button on the left-side pane in Qt Creator while your project is open.
-
The 'Qt 4.8.5' kit I created is the one I'm using to compile this project.
-
This is an excerpt of the Makefile generated by qmake for this project:
@####### Compiler, tools and options
CC = gcc
CXX = g++
DEFINES = -DSQLITE_THREADSAFE=0 -DARQUIVO_DEBUG -D_TTY_POSIX_ -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS = -pipe -fpermissive -g -Wall -W -D_REENTRANT $(DEFINES)
INCPATH = -I../../../../Qt-4.8.5/mkspecs/linux-g++ -I. -I../../../../Qt-4.8.5/include/QtCore -I../../../../Qt-4.8.5/include/QtNetwork -I../../../../Qt-4.8.5/include/QtGui -I../../../../Qt-4.8.5/include/QtXml -I../../../../Qt-4.8.5/include/QtSql -I../../../../Qt-4.8.5/include -I/home/person/Projetos/trunk/fonte/TheProject/../fonte/qextserialport-1.2rc/src -I. -Ilib -I. -I.
LINK = g++
LFLAGS = -Wl,-rpath,/home/person/Qt-4.8.5/lib
LIBS = $(SUBLIBS) -L/home/person/Qt-4.8.5/lib -L/home/person/Projetos/trunk/fonte/TheProject/lib/build -L/home/person/Projetos/trunk/fonte/TheProject/ -lconvecf -L/home/person/Projetos/trunk/fonte/TheProject/lib/build/ -lqextserialport -lAssinatura -lQtSql -L/home/person/Qt-4.8.5/lib -lQtXml -lQtGui -L/usr/X11R6/lib -lQtNetwork -lQtCore -lpthread
AR = ar cqs
RANLIB =
QMAKE = /home/person/Qt-4.8.5/bin/qmake
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
SED = sed
COPY_FILE = $(COPY)
COPY_DIR = $(COPY) -r
STRIP = strip
INSTALL_FILE = install -m 644 -p
INSTALL_DIR = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p@You can see I'm using the correct kit.
-
Try:
Build -> Clean Project "XYZ"
Build -> Run qmake
Build -> Build Project "XYZ"
-
Thanks for replying JKSH,
I did that a few times already, and it has not changed the result. I'm completely out of ideas...
-
I figured it out... turns out I was trying to link to a library that was compiled with Qt 5.1.
-
He probably rebuild the library using Qt5 and linked to that one.