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. I am trying to figure out how to compile Qt4.3.3 as a static library,
Forum Updated to NodeBB v4.3 + New Features

I am trying to figure out how to compile Qt4.3.3 as a static library,

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 2 Posters 1.4k Views 2 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.
  • Q Offline
    Q Offline
    Qt Enthusiast
    wrote on last edited by
    #1

    I have to make stattic libraries of qt4.3.3 (QtGui.a) and QtCore.a and want to link it to my tools

    I did following steps

    1. checkout out commercial source code of QT (4.3.3)
    2. cd qt-all-commercial-src-4.3.3
    3. /configure -release -static -largefile -qt3support -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -glib -platform linux-g++-64 -confirm-license -no-openssl -no-qdbus -prefix ./lib_new66 -prefix-install -opengl17:10

    Then I manually removed -fvisibility=hidden and -fvisibility-inlines-hidden from all makefiles generated

    also put -fpermissive
    it is there in all make files

    The static libraries were build but when I am linking in my tools I am getting following error undefined reference to symbol 'XRenderCreateGlyphSet'

    is there any expert who can guide me what is correct way to make and link static library of qt.4.3.3

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

      Hi,

      Looks like you also need to link to libXft.

      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
      • Q Offline
        Q Offline
        Qt Enthusiast
        wrote on last edited by
        #3

        My question when I see the configure option help then I get

        -no-xinerama ....... Do not compile Xinerama (multihead) support.

        • -xinerama .......... Compile Xinerama support.
          Requires X11/extensions/Xinerama.h and libXinerama.

        dditional options:

        -make <part> ....... Add part to the list of parts to be built at make time.
                             (libs tools examples demos)
        -nomake <part> ..... Exclude part from the list of parts to be built.
        
        -R <string> ........ Add an explicit runtime library path to the Qt
                             libraries.
        -l <string> ........ Add an explicit library.
        

        what does the last line mean , do I have to manually include libXinerama in while doing a configure because flile

        /configure -release -static -largefile -qt3support -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -glib -platform linux-g++-64 -confirm-license -no-openssl -no-qdbus -prefix ./lib_new66 -prefix-instal -lXinerama
        otherwise the tools gives linking errors for these libraries

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          Qt Enthusiast
          wrote on last edited by Qt Enthusiast
          #4

          One observation i found out if I build dynamic libraries using source code of qt.4.3.3 the
          /configure -release -largefile -qt3support -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -glib -platform linux-g++-64 -confirm-license -no-openssl -no-qdbus -prefix ./lib_new66_52 -prefix-install -opengl -sm -lSM -lICE -xshape -lX11 -xinerama -lXinerama -xcursor -lXcursor -xfixes -lXfixes -xrandr -lXrandr -xrender -lXrender -fontconfig -lfontconfig -tablet -lXi -xkb -glib -lglib-2.0 -lXext -lz -lgthread-2.0

          the tools is working fine , I am able to link it but if

          I make static library of same source code by using following steps I am able to link it to my tool and i

          /configure -static -release -largefile -qt3support -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -glib -platform linux-g++-64 -confirm-license -no-openssl -no-qdbus -prefix ./lib_new66_52 -prefix-install -opengl -sm -lSM -lICE -xshape -lX11 -xinerama -lXinerama -xcursor -lXcursor -xfixes -lXfixes -xrandr -lXrandr -xrender -lXrender -fontconfig -lfontconfig -tablet -lXi -xkb -glib -lglib-2.0 -lXext -lz -lgthread-2.0

          The changes I have done in my Makefile of the tool as added a line
          SLIBS += QtGui QtCore SM ICE Xinerama Xcursor Xrandr Xrender fontconfig Xi Xfixes glib-2.0 freetype Xext z gthread-2.0

          The tools crashes . Can someone guide me how to resolve the issue . What is there I am missing

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

            The last line means that you can link Qt against a specific version of a library

            What do you mean by crashes ?

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

            Q 1 Reply Last reply
            0
            • SGaistS SGaist

              The last line means that you can link Qt against a specific version of a library

              What do you mean by crashes ?

              Q Offline
              Q Offline
              Qt Enthusiast
              wrote on last edited by Qt Enthusiast
              #6

              @SGaist
              When I do a make in my application , there is no compilation and linking error

              but when I start he application , the applications at runtime crashes

              I also did an experiment , I tried to make a standalone hello worl application and linked it this static library and it is working fine

              What can be the cause of the crash at runtime

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

                Run your application through the debugger to get a hint at what exactly goes wrong.

                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