[uClibc] uClibc + C++, and dynamic linking issue

Manuel Novoa III mjn3 at codepoet.org
Tue Nov 18 20:12:03 UTC 2003


On Tue, Nov 18, 2003 at 09:51:24AM +0100, Rafa? Gwizda?a wrote:
> Hello,
> 
> I'm trying to create a small linux package, based on uClibc - first of all, I'd like to thank uClibc developers for this great product. I'm pretty new in uClibc and have two problems with it that I can't solve, so I'd like to ask for your help (hope this won't be too troublesome) 
> 
> Situation:
> I'm developing on a RedHat 9 system, with uClibc compiled and development tools installed in /usr/i386-linux-uclibc/.
> The target filesystem is mounted in /mnt/hdd7 - this is the small linux fs I'm creating and this partition will become the root of the small linux. Every program compiled on a dev system goes to /mnt/hdd7/bin, and uClibc libraries were installed to /mnt/hdd7/lib.
> 
> Problem 1. linking against ucLibc
> All programs compiled with uClibc tools are linked to uClibc libraries in /usr/i386-linux-uclibc/lib, but I'd like them to be linked with the same libraries in the /lib directory (since the target filesystem has libraries installed in /lib). How can I achieve this without copying uClibc libraries to /lib on my development system?

You need to read the help text for the Library Installation Options
when configuring uClibc.

> Problem 2. uClibc and C++
> I'm trying to compile some simple C++ programs and libraries. The problem is that even if compiled with the gcc provided by uClibc, they are linked with standard c++ library on my system , and sometimes they also have a dependency on libc.so.6 (glibc on my dev system, which I'm trying to avoid).
> How to make C++ libraries depend only on libs provided by uClibc?
> 

My guess is you are using the gcc wrapper, which is now deprecated.
Also, you need a libstdc++ built against uClibc.  See the various
toolchain and buildroot links on the uClibc web page.

Manuel



More information about the uClibc mailing list