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

Build error because of isnan() #10

Open
rdiez opened this issue Oct 3, 2017 · 0 comments
Open

Build error because of isnan() #10

rdiez opened this issue Oct 3, 2017 · 0 comments

Comments

@rdiez
Copy link

rdiez commented Oct 3, 2017

I got the following build error because of isnan():

--------8<--------8<--------8<--------
scons: Reading SConscript files ...
Build type: release
Using C++ compiler... g++
Checking for C++ library spnav... (cached) yes
Checking for C++ header file boost/signals2/signal.hpp... (cached) yes
Checking for C++ library exif... (cached) yes
Checking for C++ library sqlite3... (cached) yes
Checking for C library jpeg... (cached) yes
Checking for C++ library GL... (cached) yes
Checking for C++ library GLEW... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build
g++ -o build/src/galapix/workspace.o -c -std=c++11 -O3 -s -isystem/usr/include/libpng12 -isystem/usr/include/SDL2 -fopenmp -isystem/usr/include/x86_64-linux-gnu//Imag
eMagick-6 -isystem/usr/include/ImageMagick-6 -DHAVE_SPACE_NAVIGATOR=1 -D_REENTRANT -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -Ibuild/src -Isrc src/gala
pix/workspace.cpp
src/galapix/workspace.cpp: In member function 'Rectf Workspace::get_bounding_rect() const':
src/galapix/workspace.cpp:474:32: error: 'isnan' was not declared in this scope
if (isnan(image_rect.left) ||
^
src/galapix/workspace.cpp:474:32: note: suggested alternative:
In file included from /usr/include/c++/5/random:38:0,
from /usr/include/c++/5/bits/stl_algo.h:66,
from /usr/include/c++/5/algorithm:62,
from src/galapix/workspace.cpp:21:
/usr/include/c++/5/cmath:641:5: note: 'std::isnan'
isnan(_Tp __x)
^
scons: *** [build/src/galapix/workspace.o] Error 1
scons: building terminated because of errors.
--------8<--------8<--------8<--------

I fixed it simply by changing "isnan" to "std::isnan" in 4 places inside /src/galapix/workspace.cpp .

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

No branches or pull requests

1 participant