Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NumpyMarchingCubes install problems #5

Closed
bobfacer opened this issue May 21, 2023 · 1 comment · May be fixed by #24
Closed

NumpyMarchingCubes install problems #5

bobfacer opened this issue May 21, 2023 · 1 comment · May be fixed by #24

Comments

@bobfacer
Copy link

when I use python setup.py install to install NumpyMarchingCubes,it raise the following error:

   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
marching_cubes/src/marching_cubes.cpp: In function ‘void get_voxel(const vec3f&, const npy_accessor&, float, float&, int&)’:
marching_cubes/src/marching_cubes.cpp:83:32: error: ‘numeric_limits’ is not a member of ‘std’
   83 |                 if (d != -std::numeric_limits<float>::infinity() && fabs(d) < truncation) w = 1;
      |                                ^~~~~~~~~~~~~~
marching_cubes/src/marching_cubes.cpp:83:47: error: expected primary-expression before ‘float’
   83 |                 if (d != -std::numeric_limits<float>::infinity() && fabs(d) < truncation) w = 1;
      |                                               ^~~~~
marching_cubes/src/marching_cubes.cpp:83:47: error: expected ‘)’ before ‘float’
   83 |                 if (d != -std::numeric_limits<float>::infinity() && fabs(d) < truncation) w = 1;
      |                    ~                          ^~~~~
      |                                               )
marching_cubes/src/marching_cubes.cpp:87:27: error: ‘numeric_limits’ is not a member of ‘std’
   87 |                 d = -std::numeric_limits<float>::infinity();
      |                           ^~~~~~~~~~~~~~
marching_cubes/src/marching_cubes.cpp:87:42: error: expected primary-expression before ‘float’
   87 |                 d = -std::numeric_limits<float>::infinity();
      |                                          ^~~~~
error: command '/usr/bin/gcc' failed with exit code 1

How can I fix this problem?

@bobfacer
Copy link
Author

bobfacer commented May 21, 2023

I add this two line:

#include <stdexcept>
#include <limits>

to this file marching_cubes/src/marching_cubes.cpp
It works for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants