Open rlrangel opened 2 years ago
Hi @rlrangel
I am aware of the error, we are trying to find a final solution but so fair I only can give you this workaround:
1 - In pybind11/detail/common.h (line 1035) change:
template <typename... Args>
# if (defined(_MSC_VER) && _MSC_VER < 1920) /* MSVC 2017 */ \
|| (defined(__clang__) && __clang_major__ == 5)
static constexpr detail::overload_cast_impl<Args...> overload_cast = {};
# else
static constexpr detail::overload_cast_impl<Args...> overload_cast;
# endif
To
template <typename... Args>
static constexpr detail::overload_cast_impl<Args...> overload_cast = {};
The error is external to Kratos and I suspect the problem is a bad èvaluation on the _MSC_VER < 1920
.
I will ping once we have a more robust solution, but until then this should allow you to compile the code.
Thank you @roigcarlo
Is this known in pybind?
If not I would also open sn issue there
Doubt it, I found it last friday in one of my machines. Feel free to open ( I am in a course and I can not fill a proper report )
The issue is exactly the described here.
I recently started getting an error when compiling Kratos on my laptop.
It happens in the master branch, apparently with any application, as shown in the image below.
The error says the following message and repeats many times: "error C2737: 'pybind11::overload_cast': the object 'constexpr' must be initialized".
I tried to delete Kratos and clone it again, and also change the C++ Language Standard to C++17 in Visual Studio, but the error persists.
I'm using Windows 10, Python 3.9, Cmake 3.18, Boost 1.73.
In the end is the configuration file that I use to compile the PFEM Application.
Let me know if there is more information I can provide.