I added a lib on the TS-7260 I have, but do not remember the
details, and it is loaned out right now, so I can not check it. As I
recall, since the 7260 runs TS-Linux, and not debian, it just loads
anything in finds in /lib or /usr/lib, and maybe /usr/local/lib.
You could also try setting the LD_LIBRARY_PATH environment variable to
see if it can find the .so file, though you really should not use that
for a permanent fix.
I have always been able to figure out how to get it to load libraries
when I need to. Typically, it will always work if you copy the .so file
to /lib, and run ldconfig (if necessary). I prefer to use
/usr/local/lib so it is easy to see the libraries that you added, but
if you can't make it work, just try copying it into /lib. Also look at
the file permissions. Another thing, if you are adding a system
library, you sometimes need symbolic links to point at the .so that
should be used for each version of a library. This happens when the new
library is backward compatible with the old one. As an example, look at
libm below. When you compile a library, it will always create a
dependency on the most recent version in your environment (not sure
exactly how it does it).
-rw-r--r-- 1 root root 132080 2006-05-21 13:46 libm-2.3.6.so
lrwxrwxrwx 1 root root 13 2006-06-12 08:50 libm.so.6 -> libm-2.3.6.so
There are som command line tools that can help when diagnosing problems
with shared libraries:
ldd <filename> will dump the libraries (including versions) that
this shared object or executable references.
nm <filename> will show all of the symbols in a file (remember
for C++ you will have mangled names)
Talking about shared libraries, you can use dlopen(), dlclose(),
dlsym(), and dlerror() to dynamically load shared objects and execute
function inside under program control. Great for adding extensions,
etc. This is what they use for Apache Modules and other types of
plugins.
Well, let us know what you find out.
Just keep snooping, you will figure it out.
Don.
On 11/21/06, David <m("gmail.com","david.algeo");">
david.algeo@gmail.com> wrote:
that works for my system but the TS7260 does not have a ldconfig
or
/etc/ld.so/conf
it is looking in ld-linux.so for the lib name but i can not find a way
to update it.
the cross compiler is fine, the lib i need is there.
any other ideas?Â
David
Don W. Carr wrote:
You need to run ldconfig for them to be recognized on most
systems, though not all.
Also, it would be a good idea to put your libs in /usr/local/lib
If you do that you might have to add a line to /etc/ld.so.conf
For you cross compiler environment, you also need to copy your library
to one of the directories so the compiler can verify at compile time.
No need to run ldconfig here though.
Don.
--
Dr. Don W. Carr
J. G. Montenegro 2258
Guadalajara, Mexico
+52-333-630-0704
+52-333-836-4500 ext 2930
--
David..........
You have been on the computer to long when,
You start tilting your head sideways to smile :-)
--
Dr. Don W. Carr
J. G. Montenegro 2258
Guadalajara, Mexico
+52-333-630-
0704
+52-333-836-4500 ext 2930