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



  • 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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.