Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Linking problems with a static build of Qt4.7 and an external library (libconfig)
Qt 6.11 is out! See what's new in the release blog

Linking problems with a static build of Qt4.7 and an external library (libconfig)

Scheduled Pinned Locked Moved Installation and Deployment
1 Posts 1 Posters 2.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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    I compiled my application with a qt4.7 static build, after that the Qt about dialog looks like this ... !http://i44.tinypic.com/wh18cy.jpg(Qt About)! ...

    I used that configure call:
    @
    ./configure -opensource -confirm-license -release -static -fast -no-phonon -
    no-qt3support -no-multimedia -no-webkit -no-declarative -no-opengl -no-script -no-xmlpatterns -no-sql-
    sqlite -no-sql-mysql -no-dbus -nomake tools -nomake examples -nomake demos -nomake docs -nomake
    translations
    @

    What is missing in the static build? How can i fix it?

    And my second problem is to link an external library (libconfig)

    in my pro file is that generated code from the qt creator

    @
    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/Lbcnf1.4.8/lib/release/ -lconfig++
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/Lbcnf1.4.8/lib/debug/ -lconfig++
    else:symbian: LIBS += -lconfig++
    else:unix: LIBS += -L$$PWD/Lbcnf1.4.8/lib/ -lconfig++

    INCLUDEPATH += $$PWD/Lbcnf1.4.8/include
    DEPENDPATH += $$PWD/Lbcnf1.4.8/include

    win32:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/Lbcnf1.4.8/lib/release/config++.lib
    else:win32:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/Lbcnf1.4.8/lib/debug/config++.lib
    else:unix:!symbian: PRE_TARGETDEPS += $$PWD/Lbcnf1.4.8/lib/libconfig++.a
    @

    if i try to run the application, the library couldn't found and that message appears

    @
    ./ConfigBuilder: error while loading shared libraries: libconfig++.so.9: cannot open shared object file: No such file or directory
    @

    I thought it would be the correct way to use the qt creator menu add external libary and then choose the .a file .
    After i choose the file, that menu show message Link : static .... What is wrong?

    How can i link that libary as a static libary?

    I found a lot of tutorials for windows but i have to do it for linux distributions... Im a newbie ;) pls help

    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