[uClibc] Issues w/STL when compiling C++ -- (TARGET_DIR)/usr/include

Jeffrey Baitis baitisj at evolution.com
Mon Nov 3 23:03:43 UTC 2003


So really, I should be using a different '--prefix' for libjpeg, libxml?
Like, for example, /mnt/root_fs/opt/lib instead of
/mnt/root_fs/usr/include ?? :)   (I have been including
/mnt/root_fs/usr/include because i have installed libjpeg/libxml
there...)

So Manuel, what you're telling me is that the
/mnt/root_fs/usr/include/c++ files are for the *NATIVE* compiler; e.g.
invoking mipsel-linux-gcc ON the mipsel uClibC platform, and are *NOT*
to be used with my cross compiler?  Aaah, that clears things up for me
nicely. I should have thought of that earlier!

Thanks! I'm going to go try to fix this by moving libjpeg/libxml/etc out
of /mnt/root_fs/usr/include!

-Jeff


On Mon, 2003-11-03 at 14:31, Manuel Novoa III wrote:
> Hello Jeff,
> 
> On Mon, Nov 03, 2003 at 02:18:04PM -0800, Jeffrey Baitis wrote:
> > Hi all. I've seen a couple of not-very-informative posts concerning this
> > problem in the past.
> > 
> > Suppose I have my root filesystem image mounted under /mnt/root_fs.
> > I've noticed that, when compiling C++ code, if do the following:
> > 
> > /opt/build/buildroot/build_mipsel_nofpu/staging_dir/bin/mipsel-linux-g++
> > -I/mnt/root_fs/usr/include foo.cpp
> > 
> > Then I get the following errors, presumably with the STL:
> 
> ...
> 
> > Now, if I instead OMIT the -I/mnt/root_fs/usr/include (which seems
> > wrong, because all my includes should go in there), then the compile
> > works.
> 
> Omitting that isn't wrong.  You shouldn't mix the include trees for
> the cross compiler and the target native compiler.
> 
> Manuel
-- 
Jeffrey Baitis <baitisj at evolution.com>



More information about the uClibc mailing list