Re: g++ cross distro compilation problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20 January 2011 15:53, Nick Stokes wrote:
>
> Assuming you are referring to compiling a code with g++  (and not

Yep, that's what I meant.

> compiling gcc itself), then no it doesn't make a difference. (in fact,
> g++ -v shows that _GNU_SOURCE is already defined).
>
> Could it be some other silly mistake on my part, e.g forgetting to set
> an environment variable or something? Indeed there is the distro's g++
> compiler installed on the login node, and most of these headers --
> that are potentially incompatible with the gcc versions I am trying to
> install under /opt -- are under common places  /usr/include etc.

You don't need to set any environment variables to use GCC, the 4.4.3
compiler under /opt will find its own c++ headers not the ones in
/usr/include/c++/x.y.z (you can check the paths printed with -v to see
that for yourself)

You need to find why uselocale is not defined here:

/opt/gcc/4.4.3/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../include/c++/4.4.3/x86_64-unknown-linux-gnu/bits/c++locale.h:52:
error: 'uselocale' was not declared in this scope

Try using the -E flag and examining the preprocessed output. Do that
on both machines and look for differences in the path or contents of
the locale.h header.  To minimise the output it should be sufficient
to do:

echo '#include <ios>' | g++ -E -x c++  -



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux