On Wednesday 31 January 2001 12:43 am, Robert Schwebel wrote:
> Hi!
>
> We have an embedded system here which has another C library installed
> than that one on the development machine. Is it possible to compile
> and link against the embedded libc while using the 'normal' one for
> the compiler itself? If you let the linker find the embedded libc by
> using a LD_LIBRARY_PATH which contains the embedded libc on the
> development machine gcc seems to try to link against it as well
> (which fails, of course).
>
> Robert

If your development machine is the same architecture as you target, 
then LD_LIBRARY_PATH can be saved up until it is time to run the 
executables. For compiling with non-standard include files and linking 
with non-standard libraries, you should look at options such as 
-nostdinc, -I and -I- for the include files, and options such as 
-nostartfiles, -nostdlib, -nodefaultlibs, -L and -l when linking. Take 
some time to look over the info pages and you should find what you need.

There is an issue that when you run on the target, it will expect the 
libraries to be in the same directory as they were on the development 
system. You can get around this by defining LD_LIBRARY_PATH on the 
target machine, or by creating a cache of the library locations in 
/etc/ld.so.cache using the tool ldconfig.
-- 
Pete Buechler
Developer, SuSE Labs
[EMAIL PROTECTED]
http://www.suse.com/~peterb

--
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the command "unsubscribe linux-embedded" in the message body.
For more information, see <http://waste.org/mail/linux-embedded>.

Reply via email to