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. Linux/QtCreator/static-dynamic lib linking
QtWS25 Last Chance

Linux/QtCreator/static-dynamic lib linking

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 4.9k 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.
  • I Offline
    I Offline
    ikseg
    wrote on last edited by
    #1

    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
    /usr/lib/libgconf2-4/2/libgconfbackend-evoldap.so
    /usr/lib/libgconf2-4/2/libgconfbackend-oldxml.so
    /usr/lib/libgconf2-4/2/libgconfbackend-xml.so@

    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: libgconfbackend-evoldap.so: 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: =========
    /lib/libc.so.6(+0x6c501)[0x903501]
    /lib/libc.so.6(+0x6f2fc)[0x9062fc]
    ...
    ...
    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.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      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?

      1 Reply Last reply
      0
      • I Offline
        I Offline
        ikseg
        wrote on last edited by
        #3

        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)

        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