将链接器选项添加到Code :: Blocks [英] Adding linker options to Code::Blocks

查看:437
本文介绍了将链接器选项添加到Code :: Blocks的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在Win 7 x64计算机上运行使用Code :: Blocks编译的可执行文件时,它说由于libgcc_s_dw2-1丢失而无法运行.

When i try to run an executable compiled with Code::Blocks on my Win 7 x64 machine, it says it cannot run because the libgcc_s_dw2-1 is missing.

我找到了一个解决方案,将该库包含在链接器选项中. (这是我从以下网站获得的参考: http://forums.codeblocks .org/index.php?topic = 16748.0; prev_next = prev .请看最后一篇文章)

I found a solution, to include the library in the linker options. (here is the reference i got it from: http://forums.codeblocks.org/index.php?topic=16748.0;prev_next=prev. look at the last post)

问题是,当我进入链接器设置时,在项目构建选项"中,那里没有可用的库.我必须下载

The thing is, when i go to the linker settings, in Project Build Options, there are no libraries available there. Do i have to download the

-static-libgcc
-static-libstdc++

如帖子所述

,并将它们放在目录中,以便Code :: Blocks可以看到它们并将它们添加到链接器选项中?如果是的话,我应该把这些库放在哪里?

as stated by the post, and put them in a directory so Code::Blocks can see them and add them to the linker options? If yes, where do i put the libraries?

推荐答案

没关系,我在这篇文章中找到了答案 http://forums.codeblocks.org/index.php/topic,15998.0.html

Never mind, i found the answer in this post http://forums.codeblocks.org/index.php/topic,15998.0.html

总结一下,在代码块中,转到

To sum up, in Code Blocks, go to

"Settings" -> "Compiler and debugger..."
"Global compiler settings"
"Linker settings"

然后将以下选项添加到其他链接器选项"中:

Then add the following options to `"Other linker options":

-static-libgcc -static-libstdc++

那你就去...

这篇关于将链接器选项添加到Code :: Blocks的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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