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

Re: G++ 3.2

> From: Johan Neven <johan.neven@xxxxxxx.be>
> Date: Mon, 01 Dec 2003 16:47:20 +0100

> I have tried to compile the sources (giving errors with 2.96) for my
> devboard_lx with the new 3.2.1. The compilation was OK but the linker is
> still looking for libs in the old 2.96 directory. 

I forgot to mention that you need to recompile all C++ objects.
Other than that, I believe I need your help to get logs and a
detailed description to reproduce the problem you see, because
from that description alone I don't understand it.  It's not
possible that the linker is "still looking for libs in the old
2.96 directory" when linking C++ using cris-dist-1.54.  Are you
perhaps keeping cris-dist-1.25 installed somewhere, and somehow
trying to use it for linking only?

> But after I did this try-out, I saw the messages saying it's not
> devboard_lx compatible.

Correct.  Sorry.

> It would be nice to have it also for devboard_lx
> but is this physically possible with the much bigger libstdc++.so and
> probably other things?

It is; you're not forced to include libstdc++.so and libm.so;
you can link some libraries (libstdc++) statically and others
(libc) dynamically, which is useful if you only have one or two
C++ applications.

If all else worked, I'd suggest you link with "gcc-cris -mlinux"
(instead of g++-cris -mlinux) and with
"-Wl,-Bstatic,-lstdc++,-lm,-Bdynamic" which would link *only*
the standard C++ library and math (if necessary) libraries
statically.  For example, the program:

#include <iostream>
int main ()
  std::cout << "Hello, world!\n" << std::endl;

can be compiled and linked with
"gcc-cris -mlinux -o hello hello.cc -Wl,-Bstatic,-lstdc++,-Bdynamic"
to not need libstdc++.so.

brgds, H-P