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. Qt 64 bit hides its libraries

Qt 64 bit hides its libraries

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 2.2k Views
  • 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.
  • R Offline
    R Offline
    Rapidrain
    wrote on last edited by
    #1

    I am working on a program which I have been kicking around for three years.
    It is a desktop application for calculating orbits of satellites and while
    I used MinGW-make and the g++ from MinGW I could easily develop it in Eclipse
    by looking up the Qt libraries during the link phase.

    So then I wanted to do it 64bit.

    I have downloaded several different forms of Qt 64bit. None of them want to
    make their libraries accessible to g++. At the moment I have
    qt-opensource-windows-x86-msvc2015_64-5.8.0.exe

    Here is a simple example of code that Qt has suggested for a console app :


    // Horse.cpp

    #include "D:/Qt64/5.8/msvc2015_64/include/QtCore/qcoreapplication.h"

    int main(int argc, char *argv[])
    {
    QCoreApplication a(argc, argv);

    return a.exec();
    

    }

    a self-written makefile was used : makefile.Release
    and it is read by MinGW32-make

    g++ is D:/MinGW/64/bin/g++
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Some parts of my makefile.Release :

    QTDIR = D:/Qt64/5.8/msvc2015_64
    HORSEO = D:/Projects/Horse/obj/Release/horse.o

    justobj:
    @echo just compile
    g++ -c -std=gnu++11 -I'$(QTDIR)/include' -I'$(QTDIR)/include/QtCore' -o $(HORSEO) $(PRJ)/src/Horse.cpp

    justlink: $(HORSEO)
    @echo just link
    g++ -Wl,-subsystem,windows -mthreads -o $(PRJ)/bin/Release/Horse.exe $(PRJ)/obj/Release/Horse.o -L$(QTDIR)/lib -lglu32 -lopengl32 -lgdi32 -luser32 -lmingw32 -lqtmain -lQt5Widgets -lQt5Core -lQt5Gui
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    the results : compiling Horse.cpp to Horse.o is no problem at all, the header file is visible and accessible

    ......BUT..... if I call g++ to link....

    MinGW32-make -f makefile.Release justlink
    just link
    g++ -Wl,-subsystem,windows -mthreads -o D:/Projects/Horse/bin/Release/Horse.exe D:/Projects/Horse/obj/Release/Horse.o -LD:/Qt64/5.8/msvc2015_64/lib -lglu32 -lopengl32 -lgdi32 -luser32 -lmingw32 -lqtmain -lQt5Widgets -lQt5Core -lQt5Gui
    D:/Projects/Horse/obj/Release/Horse.o:Horse.cpp:(.text+0x35): undefined reference to __imp__ZN16QCoreApplicationC1ERiPPci' D:/Projects/Horse/obj/Release/Horse.o:Horse.cpp:(.text+0x3e): undefined reference to __imp__ZN16QCoreApplication4execEv'
    D:/Projects/Horse/obj/Release/Horse.o:Horse.cpp:(.text+0x50): undefined reference to __imp__ZN16QCoreApplicationD1Ev' D:/Projects/Horse/obj/Release/Horse.o:Horse.cpp:(.text+0x67): undefined reference to __imp__ZN16QCoreApplicationD1Ev'
    collect2.exe: error: ld returned 1 exit status
    makefile.Release:41: recipe for target 'justlink' failed

    You may say I must check my path to the libraries...well, here is a screen shot.
    Exactly at D:/Qt64/5.8/msvc2015_64/lib is the file QtCore.lib. But I can't access it.
    You may say I should use QtCreator. No thanks. It doesn't link there either.
    What is going on here? Must I add some other option flags??

    1 Reply Last reply
    0
    • Chris KawaC Online
      Chris KawaC Online
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Look closly: qt-opensource-windows-x86-msvc2015_64-5.8.0.exe. This is a package for Visual Studio 2015, not MinGW.
      For MinGW Qt only provides 32bit precompiled binaries. It's the qt-opensource-windows-x86-mingw530-5.8.0.exe package. If you want to use 64bit MinGW you need to download Qt's sources and compile it yourself.

      1 Reply Last reply
      2
      • R Offline
        R Offline
        Rapidrain
        wrote on last edited by
        #3

        when you say "compile it yourself", do you mean to take the qt-everywhere-opensource-src-4.8.4.tar.gz and do the things with it?

        1 Reply Last reply
        0
        • Chris KawaC Online
          Chris KawaC Online
          Chris Kawa
          Lifetime Qt Champion
          wrote on last edited by Chris Kawa
          #4

          No, qt-everywhere-opensource-src-4.8.4.tar.gz is Qt 4.8.4, very very old, for Linux, don't use it. The easiest way to get the sources is through the online installer. If you prefer an offline package use this one. You can also get sources directly from git. The last link also contains instructions for how to build Qt. In (very) short it's:

          • Get the sources
          • Setup the environment (compiler and libraries paths)
          • configure <options>
          • make (or equivalent for your compiler)
          • make install
          1 Reply Last reply
          1
          • R Offline
            R Offline
            Rapidrain
            wrote on last edited by
            #5

            thank you muchly. this is has been bugging me for two weeks. I'll try it out what you suggested. I have heard of a 'git' before.

            1 Reply Last reply
            0
            • R Offline
              R Offline
              Rapidrain
              wrote on last edited by Rapidrain
              #6

              What now?

              I had this thing building for two hours and then it stopped and complained about opengl something.

              In file included from ../../include/QtGui/qopengl.h:1:0,
              from d:/Qt64/qt-source/qt5/qtbase/src/gui/kernel/qopenglcontext.h:60,
              from ../../include/QtGui/qopenglcontext.h:1,
              from d:/Qt64/qt-source/qt5/qtbase/src/gui/kernel/qplatformintegration.h:56,
              from ../../include/QtGui/5.9.0/QtGui/qpa/qplatformintegration.h:1,
              from D:/Qt64/qt-source/qt5/qtbase/src/gui/accessible/qaccessible.cpp:52:
              d:/Qt64/qt-source/qt5/qtbase/src/gui/opengl/qopengl.h:109:26: fatal error: GLES2/gl2.h: No such file or directory
              compilation terminated.
              Makefile.Debug:13802: recipe for target '.obj/debug/qaccessible.o' failed
              mingw32-make[4]: *** [.obj/debug/qaccessible.o] Error 1
              mingw32-make[4]: Leaving directory 'd:/Qt64/qt-build/qtbase/src/gui'
              Makefile:40: recipe for target 'debug-all' failed
              mingw32-make[3]: *** [debug-all] Error 2
              mingw32-make[3]: Leaving directory 'd:/Qt64/qt-build/qtbase/src/gui'
              Makefile:576: recipe for target 'sub-gui-make_first' failed
              mingw32-make[2]: *** [sub-gui-make_first] Error 2
              mingw32-make[2]: Leaving directory 'd:/Qt64/qt-build/qtbase/src'
              Makefile:44: recipe for target 'sub-src-make_first' failed
              mingw32-make[1]: *** [sub-src-make_first] Error 2
              mingw32-make[1]: Leaving directory 'd:/Qt64/qt-build/qtbase'
              Makefile:78: recipe for target 'module-qtbase-make_first

              should I go back an run configure with -opengl??

              R 1 Reply Last reply
              0
              • R Rapidrain

                What now?

                I had this thing building for two hours and then it stopped and complained about opengl something.

                In file included from ../../include/QtGui/qopengl.h:1:0,
                from d:/Qt64/qt-source/qt5/qtbase/src/gui/kernel/qopenglcontext.h:60,
                from ../../include/QtGui/qopenglcontext.h:1,
                from d:/Qt64/qt-source/qt5/qtbase/src/gui/kernel/qplatformintegration.h:56,
                from ../../include/QtGui/5.9.0/QtGui/qpa/qplatformintegration.h:1,
                from D:/Qt64/qt-source/qt5/qtbase/src/gui/accessible/qaccessible.cpp:52:
                d:/Qt64/qt-source/qt5/qtbase/src/gui/opengl/qopengl.h:109:26: fatal error: GLES2/gl2.h: No such file or directory
                compilation terminated.
                Makefile.Debug:13802: recipe for target '.obj/debug/qaccessible.o' failed
                mingw32-make[4]: *** [.obj/debug/qaccessible.o] Error 1
                mingw32-make[4]: Leaving directory 'd:/Qt64/qt-build/qtbase/src/gui'
                Makefile:40: recipe for target 'debug-all' failed
                mingw32-make[3]: *** [debug-all] Error 2
                mingw32-make[3]: Leaving directory 'd:/Qt64/qt-build/qtbase/src/gui'
                Makefile:576: recipe for target 'sub-gui-make_first' failed
                mingw32-make[2]: *** [sub-gui-make_first] Error 2
                mingw32-make[2]: Leaving directory 'd:/Qt64/qt-build/qtbase/src'
                Makefile:44: recipe for target 'sub-src-make_first' failed
                mingw32-make[1]: *** [sub-src-make_first] Error 2
                mingw32-make[1]: Leaving directory 'd:/Qt64/qt-build/qtbase'
                Makefile:78: recipe for target 'module-qtbase-make_first

                should I go back an run configure with -opengl??

                R Offline
                R Offline
                Rapidrain
                wrote on last edited by
                #7

                @Rapidrain -opengl desktop is the correct form.

                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