Skip to content

Conversation

rmeruane
Copy link
Contributor

fix to support android cross compile using latest Android NDK (r9c)

# define pcl_isnan(x) isnan(x)
# define pcl_isfinite(x) isfinite(x)
# define pcl_isinf(x) isinf(x)
# define pcl_isnan(x) std::isnan(x)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did something change in a newer NDK? This was working fine until now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, something changed. Newer NDK like r9, r9b and r9c produce the following error:

/home/rafael/pcl-superbuild/build/CMakeExternals/Source/pcl/common/include/pcl/pcl_macros.h:105:36: error: 'isfinite' was not declared in this scope
 # define pcl_isfinite(x) isfinite(x)
                                    ^
/home/rafael/pcl-superbuild/build/CMakeExternals/Source/pcl/common/include/pcl/pcl_macros.h:105:36: note: suggested alternative:
In file included from /home/rafael/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.8/include/complex:44:0,
                 from /home/rafael/pcl-superbuild/build/CMakeExternals/Install/boost-android/include/boost/type_traits/is_complex.hpp:12,
                 from /home/rafael/pcl-superbuild/build/CMakeExternals/Install/boost-android/include/boost/type_traits.hpp:47,
                 from /home/rafael/pcl-superbuild/build/CMakeExternals/Source/pcl/common/include/pcl/register_point_struct.h:65,
                 from /home/rafael/pcl-superbuild/build/CMakeExternals/Source/pcl/common/include/pcl/point_types.h:44,
                 from /home/rafael/pcl-superbuild/build/CMakeExternals/Source/pcl/common/src/point_types.cpp:37:
/home/rafael/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.8/include/cmath:818:5: note:   'std::isfinite'
     isfinite(_Tp __f)
     ^

rbrusu added a commit that referenced this pull request Jan 2, 2014
fix to support android cross compile
@rbrusu rbrusu merged commit 77d0240 into PointCloudLibrary:master Jan 2, 2014
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 this pull request may close these issues.

2 participants