thank you veru much Don, I wil try for that and if I get anything wrong i will ask again
On 7/18/06, Don W. Carr <> wrote:
Ok,
so the cross compiler can check you library at link time, you need to
copy your library to the following directory under the cross compiler:
opt/crosstool/arm-linux/gcc-3.3.4-glibc-2.3.2/arm-linux/lib/
To
compile your own shared library from object files, you need to use the
-shared option as shown in the example below. In this example, the
library name is rtcommon, but you need to add "lib" to the front, and
".so" to the end. This is the naming convention used by the compiler,
so when you put -lrtcommon, it looks for librtcommon.so.
CC=arm-linux-gcc
librtcommon.so: arg.o common.o safestr.o utimer.o memfail.o $(CC) -shared -o librtcommon.so arg.o common.o safestr.o utimer.o
memfail.o
After
creating the shared library, you need to copy it to the cross tool
directory as shown above, and also to /lib, /usr/lib, or /usr/local/lib
on your SBC. (I always use /usr/local/lib if available). On some
systems, you will then need to run ldconfig as root to add the library
to the recognized set. On the 7260, I do not think it is necessary. If
you put it in /usr/local/lib, on some systems you need to add the
following line to /etc/ld.so.conf before running ldconfig:
/usr/local/lib
To add libraries from the cross tools
that are not on your board, you can copy them from the library
directory of the cross tool to /lib/ on the board. You should probably
strip them first using the strip command from the cross tools. Really,
the best would be for TS to supply the full set of libraries
pre-compiled on the website so we could download and install them. They
were trying to install a minimal set to save space I imagine. Actually,
you could probably copy them from the debian distribution since they
are the exact same version as TS-Linux. Somebody correct me if I am
wrong here please!
If you have any more questions or problems, please let me know!
Don.
On 7/17/06, chathsuom moratuwa
<> wrote:
hi,
before the time you reply I came to a some solution and it works. I compile it like this.
arm-linux-g++ dThread.cpp -o dThread -lpthread -static -lstdc++
it works well. but i need to know how to include libraries and creating my own libraries.
chathuranga
-- Dr. Don W. Carr J. G. Montenegro 2258 Guadalajara, Mexico +52-333-630-0704 +52-333-836-4500 ext 2930
__._,_.___
YAHOO! GROUPS LINKS
- Visit your group "ts-7000" on the web.
- To unsubscribe from this group, send an email to:
=Unsubscribe
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
|