Shared libraries

This is a discussion on Shared libraries within the C++ Programming forums, part of the General Programming Boards category; I am developing a project using Qt 4.8.4 on code::blocks,so far everything is okay except that when I run the ...

  1. #1
    Tweaking master Aslaville's Avatar
    Join Date
    Sep 2012
    Location
    Rogueport
    Posts
    173

    Shared libraries

    I am developing a project using Qt 4.8.4 on code::blocks,so far everything is okay except that when I run the project it cannot locate the shared libraries;the object file of my project is created in a different directory and can therefore not locate the the shared libraries in the Qt directory.Does it mean I have to keep copying those shared libraries into the directory the contains the object files of my project.

  2. #2
    Registered User
    Join Date
    Sep 2008
    Posts
    200
    Because you talk of shared libraries ("DLLs seems to be the common Windows parlance") I assume you're running on Linux. If so, set the environment variable "LD_LIBRARY_PATH" to the directory in which your shared libraries are located. (See the first section of this post on my blog if you want more detail).
    Programming and other random guff: cat /dev/thoughts > blogspot.com (previously prognix.blogspot.com)

    ~~~

    "The largest-scale pattern in the history of Unix is this: when and where Unix has adhered most closely to open-source practices, it has prospered. Attempts to proprietarize it have invariably resulted in stagnation and decline."

    Eric Raymond, The Art of Unix Programming

  3. #3
    a newbie :p
    Join Date
    Aug 2008
    Location
    Zurich, Switzerland, Switzerland
    Posts
    90
    I would assume this guy is not using Linux. In many cases, it is less problematic to deal with open source library in Linux, as when you install them with default setting or using precompiled packages from your distro, they go to default directory, and that's pretty much to it.

    In windows, what I generally do is to set the output path from my IDE to one specific folder, let's say /bin, and copy all precompiled DLLs to that folder.

  4. #4
    Tweaking master Aslaville's Avatar
    Join Date
    Sep 2012
    Location
    Rogueport
    Posts
    173
    Quote Originally Posted by auralius View Post
    I would assume this guy is not using Linux. In many cases, it is less problematic to deal with open source library in Linux, as when you install them with default setting or using precompiled packages from your distro, they go to default directory, and that's pretty much to it.

    In windows, what I generally do is to set the output path from my IDE to one specific folder, let's say /bin, and copy all precompiled DLLs to that folder.
    yea,...that is exactly what I did.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. shared libraries in c++ name mangling error
    By mayank.gupta22 in forum Linux Programming
    Replies: 7
    Last Post: 02-13-2012, 04:11 PM
  2. shared libraries
    By kris.c in forum Linux Programming
    Replies: 5
    Last Post: 12-25-2006, 07:08 PM
  3. Shared Libraries and such
    By divineleft in forum Linux Programming
    Replies: 3
    Last Post: 11-04-2006, 07:38 PM
  4. Problems with shared libraries
    By nilesh82 in forum C Programming
    Replies: 2
    Last Post: 10-02-2005, 06:29 AM
  5. shared libraries
    By Raven Arkadon in forum C++ Programming
    Replies: 5
    Last Post: 06-27-2005, 07:11 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21