Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Linux: How to set search path for shared library

Posted on 2006-10-27
1
1,452 Views
Last Modified: 2010-08-05
Hi Experts,

I want to debug a program using GDB.  my small program uses a shared library which resides in my current directory.  

When I run the program normally, I use the following method to load the library.

%LD_LIBRARY_PATH=. ./MyProgram

But, if I want to run gdb how should I tell the debugger to search the current directory for the shared library along with the standard paths( My program uses some other installed libraries in the standard path as well )
0
Comment
Question by:ambuli
1 Comment
 
LVL 17

Accepted Solution

by:
rstaveley earned 300 total points
ID: 17828090
export LD_LIBRARY_PATH
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question