Re: [AD] Static linking requires libstdc++ with mingw?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2009-01-08, Trent Gamblin <trent@xxxxxxxxxx> wrote:
> On Thu, January 8, 2009 11:46 am, Elias Pschernig said:
> > On Thu, 2009-01-08 at 10:27 -0700, Thomas Fjellstrom wrote:
> >> On January 8, 2009, Trent Gamblin wrote:
> >> >
> >> > The warnings aren't because of your DX, it happens no matter what. I don't
> >> > know what the problem there is. I get it when linking static A4 too. It's
> >> > safe to ignore them though. But needing to link in libstdc++ is a bit
> >> > odd... that could be something to do with your mingw setup, since I've
> >> > never seen that or heard of anyone else seeing it. It wouldn't hurt I
> >> > suppose to explicitly link it, but I'm wondering if there isn't something
> >> > else at fault. What version of gcc/g++ do you have? What packages did you
> >> > install?
> >
> > $ gcc --version
> > gcc.exe (GCC) 4.3.0 20080305 (alpha-testing) mingw-20080502
> 
> I would say it's probably a newer gcc thing, since I've only used
> 4.2.1 and 3.4.5.. If it has to be added to link flags for examples that
> couldn't be too hard.

Note: you shouldn't need to add it for each individual example.
Just add stdc++ to PLATFORM_LIBS before this call:

    add_our_library(allegro -${ALLEGRO_VERSION}
	"${LIBRARY_SOURCES}"
	"${LIBRARY_CFLAGS} -DALLEGRO_LIB_BUILD -DALLEGRO_SRC"
	"${PLATFORM_LIBS}"
	)

Anything which links with allegro will pull in its dependencies
automatically.

Peter





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/