Linux/QtCreator/static-dynamic lib linking

  • dear colleagues, i need help

    I've got really weird problem and don't know how to resolve it.

    I've made the static library. This library contains algorithms for working with gconf-client. Library works only with using *.so objects. I wrote full path to each of necessarily *.so files in *.pro file.

    @LIBS += /home/xray/LibraryLoader/liblibraryloader.a -ldl

    The program has successfully built but had problems with start.
    I've got this message:
    @/home/xray/testLibs-build-desktop/testLibs: error while loading shared libraries: cannot open shared object file: No such file or directory@

    So, I've decided to set a variable LD_LIBRARY_PATH=/usr/lib/libgconf2-4/2/

    After that, I built the program again and then tried to start. I've got this:

    @Starting /home/xray/testLibs-build-desktop/testLibs...
    *** glibc detected *** /home/xray/testLibs-build-desktop/testLibs: malloc(): memory corruption: 0x09ab7900 ***
    ======= Backtrace: =========
    b76fe000-b7705000 r--s 00000000 08:07 6393 /usr/lib/gconv/gconv-modules.cache
    b7705000-b7706000 r--p 002a1000 08:07 7283 /usr/lib/locale/locale-archive
    b7706000-b7708000 rw-p 00000000 00:00 0
    bf7fc000-bf81d000 rw-p 00000000 00:00 0 [stack]
    The program has unexpectedly finished.
    /home/xray/testLibs-build-desktop/testLibs exited with code 0@

    When I'm trying to start program in debug mode and go step by step, I get the exception at this line of code:
    g_type_init(); // initialization of gconf api

    This is the first call of function located in *.so object. It seems to me that body of function located in *.so was not loaded.
    I will appreciate all useful advices.
    Thanks in advance.

  • Moderators

    You might have better luck asking in a gnome forum about this: This seems a gconf related issue which is not widely used in the Qt camp:-)

    Does gconf support being build statically at all?

  • before using QT I compiled console application with this static library in NetBeans IDE. Program has started and implemented successfully. :)

    so... i should try to get luck somewhere else. thx)

    but still in hope)

Log in to reply

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