fcl
fcl copied to clipboard
Shared lib support is broken on Windows
- fcl fails to build as a shared lib whatever Visual Studio version is used.
- fcl can be build as a shared lib with MinGW (when it doesn't fail due to big obj), but it fails to be consumed.
I suspect a bad use of dllexport/dllimport in front of templates.
- Visual Studio 2019 with MD runtime:
A lot of warning like this:
include/fcl/math/bv/AABB-inl.h(48,30): warning C4910: 'fcl::AABB<double>': '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation
and errors like this:
include/fcl/math/geometry-inl.h(429,1): error C2893: Failed to specialize function template 'void fcl::normalize(Eigen::Matrix<_Scalar,3,1,0,3,1> &,bool *)'
- MinGW:
If fails when consuming fcl with:
C:/Users/appveyor/.conan/data/fcl/0.6.1/SpaceIm/testing/package/460e327f62c1e86621f1d6a10e8238f247027750/include/fcl/math/geometry-inl.h:152:3: error: function 'S fcl::detail::maximumDistance_mesh(fcl::Vector3<S_>*, fcl::Vector3<S_>*, fcl::Triangle*, unsigned int*, int, fcl::Vector3<S_>&)' definition is marked dllimport