I finally got this figured out. Not sure why it is working, but it is. And in the interest of being helpful in the case anyone else stumbles onto this thread, I'll relate what worked for me.
This is on a Dapper system, and the program I wanted to compile was shark.c. And for any search engines, this is the program that controls the Radio Shark (Radioshark). I put the libraries I needed in a directory that I called 'libraries'. (These all came from Edgy packages.)
Code:
~/radioshark $ ls libraries/
ld-linux.so.2 libc.so.6 libhid.so.0 libusb-0.1.so.4
I needed two of the newer libraries for shark.c to compile, so I specified both on the cc command line. I also stumbled on a magic option to pass (via the -Xlinker optino) to the linker:
Code:
~/radioshark $ cc -o sharktest -Xlinker -rpath -Xlinker libraries/ libraries/libhid.so.0 libraries/libc.so.6 shark.c
I need to use sudo to run the program. But the key thing I stumbled on was to use the newer ld-linux.so at run time:
Code:
~/radioshark $ sudo ./sharktest -red 0 Password:
Segmentation fault
~/radioshark $ sudo libraries/ld-linux.so.2 ./sharktest -red 1
And that last line *works*
Bookmarks