Author Topic: How do I debug program with shared lib?  (Read 4111 times)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2775
How do I debug program with shared lib?
« on: March 31, 2007, 07:21:37 pm »
I'm trying to run CodeSnippets as an executable for easier debugging. This works great on MSW.

But on Linux, running the program with the debugger gets the following error trying to find the share libs (same ones CodeBlocks uses).

How do I tell the debugger where the .so files are?

Code
>>>>>>cb_gdb:
> start
Breakpoint 1 at 0x805db3c: file /home/pecan/proj/cbCodesnippets/codesnippetsapp.cpp, line 27.
/mnt/e/linux/proj/cbCodesnippets/bin/debug/codesnippets: error while loading shared libraries: libwxscintilla.so: cannot open shared object file: No such file or directory
Program exited with code 0177.
>>>>>>cb_gdb:
> quit


devilsclaw

  • Guest
Re: How do I debug program with shared lib?
« Reply #1 on: March 31, 2007, 08:16:54 pm »
you have to have a parent program that uses its exported functions.

C::B calls it the host application and that you have to define it before trying to run it.
« Last Edit: March 31, 2007, 08:20:41 pm by devilsclaw »