[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] g++ problem with archives & linking
On Thu, 2008-02-21 at 19:33 +0100, Frank Naumann wrote:
> Hello!
>
> > Whereas if you do this...
> >
> > m68k-atari-mint-g++ -o main main.o
> >
> > it works fine.
> >
> > Any ideas Vincent ??
>
> I'm not Vincent but your first g++ line is incorrect I think (I assume the
> same happens with gcc). You must at least specify an object file with
> main(). For static libraries the gcc linker optimize linkage by throwing
> away any unused symbols. Without any object file the library is completly
> skipped (the startup code don't count).
Ah, yes, right you have hit the problem Frank, but this works fine on
Linux, even with using -static or without.
Alan.