Newbie problem with gcc 4.2 compiler (Mac OSX): fpu_control.h: No such file or directory

I am trying to compile a program in c / C ++, but I get an error message:

fpu_control.h: No such file or directory

From google, I found out that this problem is related to the way floating point precision is handled. I read that not all gcc distributions include fpu_control.h.

This is the only thing I can find out. I searched extensively and cannot find anywhere to download this fpu_control.h file. Can anyone help?

Thanks to everyone.

+6
c ++ c gcc fpu
source share
2 answers

Apple does not support setting FPU flags, and you don’t need to . The reason is that they don’t even use the i387 coprocessor for float and double, but SSE . The last link also explains how to undo this approach and how to manage FPUs using the built-in assembly.

+5
source share

fpu_control.h is not a Mac OSX header. Obviously, the code you are trying to compile was not going to compile on OSX. You will either have to comment on this functionality, or replace it in your own header (perhaps this is called fpu_control.h).

0
source share

All Articles