uoip / pangolin

Python binding of 3D visualization library Pangolin
MIT License
285 stars 90 forks source link

OSx Make Error #23

Closed lloydrayner closed 4 years ago

lloydrayner commented 4 years ago

I am trying to build on a mac and receiving the below errors, I'm not sure what to do to fix it. Can anyone help?

Thank you

`In file included from /Users/lrayner/PycharmProjects/playground2/pangolin/python/pangolin.cpp:2: /Users/lrayner/PycharmProjects/playground2/pangolin/external/pybind11/include/pybind11/stl.h:283:46: error: no member named 'experimental' in namespace 'std' template struct type_caster<std::experimental::optional>


/Users/lrayner/PycharmProjects/playground2/pangolin/external/pybind11/include/pybind11/stl.h:283:69: error: 'T' does not refer to a value
template<typename T> struct type_caster<std::experimental::optional<T>>
                                                                    ^
/Users/lrayner/PycharmProjects/playground2/pangolin/external/pybind11/include/pybind11/stl.h:283:19: note: declared here
template<typename T> struct type_caster<std::experimental::optional<T>>
                  ^
/Users/lrayner/PycharmProjects/playground2/pangolin/external/pybind11/include/pybind11/stl.h:286:36: error: no member named 'experimental' in namespace 'std'
template<> struct type_caster<std::experimental::nullopt_t>
`
lloydrayner commented 4 years ago

Figured it out, the std.h file was different to that in the pybind11 repository.

I swapped out

`# if defined(PYBIND11_CPP14) && __has_include(<experimental/optional>)

include <experimental/optional>

define PYBIND11_HAS_EXP_OPTIONAL 1

endif`

for

`# if defined(PYBIND11_CPP14) && (__has_include(<experimental/optional>) && \ !__has_include())

include <experimental/optional>

define PYBIND11_HAS_EXP_OPTIONAL 1

endif`