Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linking with -static-libstdc++ flag on MinGW 4.7.1 [closed]

I try to compile (Allegro 5) on MinGW 4.7.1
(using Code::Blocks 12.11 on Win 7)
with compiler flags
(write them in Project :: Linker settings :: Other linker settings):

-static-libgcc
-static-libstdc++

Result:

unrecognized command line option '-static-libstdc++'

How to solve it?

like image 557
topright gamedev Avatar asked Jan 08 '13 22:01

topright gamedev


1 Answers

What does g++ --version say? I don't know the exact version when it was introduced, but -static-libstdc++ is a fairly recent addition. Before, you had to do something like -static -lstdc++ -dynamic. (If the compiler version is 4.7.1, this should not be a problem, but I don't know how MinGW versions map to the actual compiler version.)

like image 65
James Kanze Avatar answered Sep 20 '22 18:09

James Kanze