Results 1 to 2 of 2

Thread: Using symbols from loading application in shared library

  1. #1
    Join Date
    Nov 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Using symbols from loading application in shared library

    Hi

    I'm developing an application and I want to extend it with shared library.
    Library have to access application's symbols to modify QTreeWidget (which is a member of application) and there's a problem. I pass tree widget pointer to library using class constructor and store it in variable, but every time I start application I get undefined symbol or segmentation fault error. So my question is: is there any possibility of passing symbols to shared library? Or maybe there is programming philosophy of doing such things?

    PS. Both, library and application, compiles without problem. And when I use "nm -D library.so" it shows symbol which I'm looking for.

    PS2. Sorry for any language mistakes, I'll explain anything if it is needed.

    Platform: Ubuntu 10.10 64bit
    Qt: 4.7 64bit

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Using symbols from loading application in shared library

    Quote Originally Posted by barteksch View Post
    undefined symbol or segmentation fault error
    Without changing the code it would be one or the other, not both.
    Since you say the symbols can be found, I guess the main problem is a segmentation fault?

    If so, it might be a simple pointer error.

    Can you post a compilable and minimal example demonstrating the problem?

Similar Threads

  1. How to deploy application using shared library in Linux
    By cutie.monkey in forum Installation and Deployment
    Replies: 9
    Last Post: 21st January 2010, 18:41
  2. Application with shared library problem in linux
    By cutie.monkey in forum Qt Programming
    Replies: 1
    Last Post: 18th January 2010, 07:20
  3. Replies: 4
    Last Post: 20th May 2009, 10:20
  4. qmake: dependency of application on common shared library
    By PeterWurmsdobler in forum Qt Programming
    Replies: 5
    Last Post: 27th March 2009, 16:13
  5. Loading library from application
    By mourad in forum Installation and Deployment
    Replies: 0
    Last Post: 2nd April 2008, 15:10

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.