在MinGW 4.7.1上链接-static-libstdc ++标志 [英] Linking with -static-libstdc++ flag on MinGW 4.7.1

查看:332
本文介绍了在MinGW 4.7.1上链接-static-libstdc ++标志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在MinGW 4.7.1上编译(Allegro 5)

(在Win 7上使用Code :: Blocks 12.11)

带编译器标志

(将它们写入Project :: Linker设置::其他链接器设置):

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 ++

-static-libgcc
-static-libstdc++

结果:


无法识别的命令行选项'-static-libstdc ++'

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

如何解决?

推荐答案

g ++ --version 说什么?我不知道确切的版本
当它被介绍,但 -static-libstdc ++ 是一个相当的
最近添加。以前,你不得不做一些 -static
-lstdc ++ -dynamic
。 (如果编译器版本是4.7.1,这个
不应该是一个问题,但我不知道MinGW版本如何映射
到实际的编译器版本。)

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.)

这篇关于在MinGW 4.7.1上链接-static-libstdc ++标志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆