gcc 4.2 编译器的新手问题(Mac OSX):fpu_control.h:没有这样的文件或目录
我正在尝试用 c/c++ 编译程序,但收到错误消息:
fpu_control.h: No such file or directory
从google,我发现这个问题与处理浮点精度的方式有关。我读到并非所有 gcc 发行版都包含 fpu_control.h。
这是我唯一能查到的事情。我进行了大量搜索,但找不到任何地方可以下载此 fpu_control.h。有人可以帮忙吗?
谢谢大家。
I am trying to compile a program in c/c++, but am getting the error message:
fpu_control.h: No such file or directory
From google, I have found out that this problem is about the way floating point precision is handled. I read that not all distributions of gcc include fpu_control.h.
This is the only thing I can find out. I have searched extensively and cannot find anywhere to download this fpu_control.h. Can anyone help?
Thank you all.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Apple 不支持设置 FPU 标志,并且不需要这样做 。原因是他们甚至不使用i387 协处理器用于 float 和 double,但 SSE。最后一个参考文献还解释了如何恢复该方法,以及如何使用内联汇编执行 FPU 控制。
Apple doesn't support setting the FPU flags, and doing so isn't needed. The reason is that they don't even use the i387 coprocessor for float and double, but SSE. The last reference also explains how to revert that approach, and how to perform FPU control using inline assembly.
fpu_control.h 不是 mac OSX 标头。显然,您尝试编译的代码并不适合在 OSX 上编译。您必须注释掉此功能或将其替换到您自己的标头中(为了方便起见,可能称为 fpu_control.h)。
fpu_control.h is not a mac OSX header. The code you are trying to compile wasn't meant to be compiled on OSX, evidently. You will have to either comment out this functionality or replace it in your own header (potentially called fpu_control.h for ease).