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

StackOverflow https://stackoverflow.com/questions/4271881

  •  28-09-2019
  •  | 
  •  

Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top