Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » error: unrecognized command line option '-static-libstdc++'

This thread is locked; no one can reply to it. rss feed Print
error: unrecognized command line option '-static-libstdc++'
Xenowar
Member #12,630
March 2011

Hello folks,
I'm having trouble getting Allegro running with Code::Blocks 12.11
I followed the tutorial here:

http://wiki.allegro.cc/index.php?title=Windows_Vista,_Code::Blocks_10.05_and_Allegro_5

and downloaded the 5.0.8 version for MinGW 4.7.0. Linking all the relevant
libraries, etc. I tried to compile the program, but it gave me this error:

mingw32-g++.exe: error: unrecognized command line option '-static-libstdc++'

Anyone knows what's up with that and how to fix it?

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

pkrcel
Member #14,001
February 2012

C::B comes bundled with TDM-GCC 4.7.1, which has some peculiar differences with vanilla gcc 4.7.0, namely the way it handles statc and dynaminc c-lib linking.

TDM-GCC 4.7.1 defaults to static linking.

It is unlikely that Google shares your distaste for capitalism. - Derezo
If one had the eternity of time, one would do things later. - Johan Halmén

Xenowar
Member #12,630
March 2011

Hmm, alright, I removed the static parts -static-libgcc -static-libstdc++ and now I get this error:

ld.exe cannot find -lgcc_eh

pkrcel
Member #14,001
February 2012

Same as before I think, in my TDM-GCC 4.7.1 setup I do not have those three options at all and it compiles and run okay.

EDIT: only for allegro dynamic builds thou, I haven't bothered to link all the libraries other than the C runtime, 'cause it's needed only for a quick hack for another thread here.

It is unlikely that Google shares your distaste for capitalism. - Derezo
If one had the eternity of time, one would do things later. - Johan Halmén

Xenowar
Member #12,630
March 2011

I kinda fixed it. I just threw out the MinGW 4.7.1 and used 4.5.0 instead and
downloaded the allegro 5.0.8 files for MinGW 4.5.0.

pkrcel
Member #14,001
February 2012

Well, binaries for 4.7.0 DO work with TDM-GCC 4.7.1, I personally tested it (to a very limited extent....so you just took the longer route to me. :P

It is unlikely that Google shares your distaste for capitalism. - Derezo
If one had the eternity of time, one would do things later. - Johan Halmén

Go to: