使用 XCode 增加堆栈大小

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2092495/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 19:04:24  来源:igfitidea点击:

Increase stack size with XCode

xcodeg++

提问by asdf

I developed a command line application on Linux which needs its stack to be increased. On Linux I just used the workaround: ulimit -s unlimitedbefore running the program. On Mac OS X, command line with G++, I add to the compilation options:

我在 Linux 上开发了一个命令行应用程序,它需要增加它的堆栈。在 Linux 上,我只使用了解决方法:ulimit -s unlimited在运行程序之前。在 Mac OS X 上,使用 G++ 的命令行,我添加到编译选项中:

-Wl,-stack_size,0x10000000

and it works.

它有效。

Now I am developing this program with XCODE, where should I add this option?

现在我正在用 XCODE 开发这个程序,我应该在哪里添加这个选项?

采纳答案by cobbal

From the project window:

从项目窗口:

Targets > [Your target] > info > Build > Other Linker Flags > [your flags]

目标 > [您的目标] > 信息 > 构建 > 其他链接器标志 > [您的标志]