The file "gp_Dir2d.lxx" that I found in opencascade project was never meant to be treated as a source file as in being compiled.
Instead it should be treated as a header file and the compiling and linking turned off for the file.
So, the file extension of "lxx" should not be a problem. Still waiting for a build log!
Tim S.
Thanks for you guys' replies!
I'm really appreciate that!
Sorry to response so late, I was temporarily working on some other stuff in the past months. Give me the pardon!
Also something wrong with my pc, so I rebuild the project. The error still exists.
Here is part of build log, and I using "
..." to replace the fullpath
Also, the 12 errors are all the same.
...\opencascade-7.5.0\inc/gp_Vec.lxx: In member function 'Standard_Boolean gp_Vec::IsParallel(const gp_Vec&, Standard_Real) const':
...\opencascade-7.5.0\inc/gp_Vec.lxx:111:39: error: 'M_PI' was not declared in this scope
return Ang <= AngularTolerance || M_PI - Ang <= AngularTolerance;
^
Process terminated with status 1 (0 minute(s), 1 second(s))
12 error(s), 0 warning(s) (0 minute(s), 1 second(s))
M_PI is not part of the C standard but part of POSIX. Most probably the OP is using GCC and that one is more strict regarding the standard. Using a C standard with GNU extensions does help in that case, e.g. instead of using --std=c11 use --std=gnu11.
Actually, I use the
GNU GCC Compiler in the project.
As for the compiler flags, I picked the -std=c++11.
But error remains.
By the way, I tried to include
math.h instead of
cmath, this still happens.
Attachment is the pic of the compiler flags.