Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Compilation problems in environment with Qt 4.8 and 5.1
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Compilation problems in environment with Qt 4.8 and 5.1

Scheduled Pinned Locked Moved General and Desktop
11 Posts 5 Posters 8.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    Are you sure your project is using the right kit ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tiredtyrant
      wrote on last edited by
      #3

      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:

      !http://i.imgur.com/LWsL6Xw.png(screenshot)!

      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #4

        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.

        (Z(:^

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tiredtyrant
          wrote on last edited by
          #5

          The 'Qt 4.8.5' kit I created is the one I'm using to compile this project.

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tiredtyrant
            wrote on last edited by
            #6

            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.

            1 Reply Last reply
            0
            • JKSHJ Offline
              JKSHJ Offline
              JKSH
              Moderators
              wrote on last edited by
              #7

              Try:

              Build -> Clean Project "XYZ"

              Build -> Run qmake

              Build -> Build Project "XYZ"

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              1 Reply Last reply
              0
              • T Offline
                T Offline
                tiredtyrant
                wrote on last edited by
                #8

                Thanks for replying JKSH,

                I did that a few times already, and it has not changed the result. I'm completely out of ideas...

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  tiredtyrant
                  wrote on last edited by
                  #9

                  I figured it out... turns out I was trying to link to a library that was compiled with Qt 5.1.

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mellow
                    wrote on last edited by
                    #10

                    [quote author="tiredtyrant" date="1374005189"]I figured it out... turns out I was trying to link to a library that was compiled with Qt 5.1. [/quote]

                    How do you fix that?

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #11

                      He probably rebuild the library using Qt5 and linked to that one.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved