Skip to content

Commit fa2a7fb

Browse files
committed
Fix windows/MSVC build.
1 parent c7b30f6 commit fa2a7fb

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ SET(${PROJECT_NAME}_HEADERS
109109
INCLUDE_DIRECTORIES(${${PROJECT_NAME}_BINARY_DIR}/include)
110110
INCLUDE_DIRECTORIES(${${PROJECT_NAME}_SOURCE_DIR}/include)
111111

112+
LINK_DIRECTORIES(${PYTHON_LIBRARY_DIRS})
113+
112114
# ----------------------------------------------------
113115
# --- TARGETS ----------------------------------------
114116
# ----------------------------------------------------
@@ -130,6 +132,7 @@ ADD_LIBRARY(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_
130132
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}${PYTHON_SOABI}")
131133

132134
TARGET_LINK_BOOST_PYTHON(${PROJECT_NAME})
135+
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
133136
PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME} eigen3)
134137
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
135138

include/eigenpy/details.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ namespace eigenpy
300300
// Check if the Scalar type of the obj_ptr is compatible with the Scalar type of MatType
301301
if ((PyArray_ObjectType(reinterpret_cast<PyObject *>(obj_ptr), 0)) == NPY_INT)
302302
{
303-
if(not FromTypeToType<int,typename MatType::Scalar>::value)
303+
if(!FromTypeToType<int,typename MatType::Scalar>::value)
304304
{
305305
#ifndef NDEBUG
306306
std::cerr << "The Python matrix scalar type (int) cannot be converted into the scalar type of the Eigen matrix. Loss of arithmetic precision" << std::endl;
@@ -310,7 +310,7 @@ namespace eigenpy
310310
}
311311
else if ((PyArray_ObjectType(reinterpret_cast<PyObject *>(obj_ptr), 0)) == NPY_LONG)
312312
{
313-
if(not FromTypeToType<long,typename MatType::Scalar>::value)
313+
if(!FromTypeToType<long,typename MatType::Scalar>::value)
314314
{
315315
#ifndef NDEBUG
316316
std::cerr << "The Python matrix scalar type (long) cannot be converted into the scalar type of the Eigen matrix. Loss of arithmetic precision" << std::endl;
@@ -320,7 +320,7 @@ namespace eigenpy
320320
}
321321
else if ((PyArray_ObjectType(reinterpret_cast<PyObject *>(obj_ptr), 0)) == NPY_FLOAT)
322322
{
323-
if(not FromTypeToType<float,typename MatType::Scalar>::value)
323+
if(!FromTypeToType<float,typename MatType::Scalar>::value)
324324
{
325325
#ifndef NDEBUG
326326
std::cerr << "The Python matrix scalar type (float) cannot be converted into the scalar type of the Eigen matrix. Loss of arithmetic precision" << std::endl;
@@ -330,7 +330,7 @@ namespace eigenpy
330330
}
331331
else if ((PyArray_ObjectType(reinterpret_cast<PyObject *>(obj_ptr), 0)) == NPY_DOUBLE)
332332
{
333-
if(not FromTypeToType<double,typename MatType::Scalar>::value)
333+
if(!FromTypeToType<double,typename MatType::Scalar>::value)
334334
{
335335
#ifndef NDEBUG
336336
std::cerr << "The Python matrix scalar (double) type cannot be converted into the scalar type of the Eigen matrix. Loss of arithmetic precision." << std::endl;

include/eigenpy/expose.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace eigenpy
2727
template<typename T>
2828
inline void expose()
2929
{
30-
if(not register_symbolic_link_to_registered_type<T>())
30+
if(!register_symbolic_link_to_registered_type<T>())
3131
internal::call_expose<T>::run();
3232
}
3333
}

include/eigenpy/ref.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111

1212
// For old Eigen versions, EIGEN_DEVICE_FUNC is not defined.
1313
// We must define it just in the scope of this file.
14-
#if not EIGEN_VERSION_AT_LEAST(3,2,90)
14+
#if !EIGEN_VERSION_AT_LEAST(3,2,90)
1515
#define EIGEN_DEVICE_FUNC
1616
#endif
1717

1818
namespace eigenpy
1919
{
2020

21-
template<typename PlainObjectType>
22-
struct Ref : Eigen::Ref<PlainObjectType,EIGENPY_DEFAULT_ALIGNMENT_VALUE,typename StrideType<PlainObjectType>::type>
21+
template<typename PlainObjectTypeT>
22+
struct Ref : Eigen::Ref<PlainObjectTypeT,EIGENPY_DEFAULT_ALIGNMENT_VALUE,typename StrideType<PlainObjectTypeT>::type>
2323
{
2424
public:
25-
typedef Eigen::Ref<PlainObjectType,EIGENPY_DEFAULT_ALIGNMENT_VALUE,typename StrideType<PlainObjectType>::type> Base;
26-
25+
typedef Eigen::Ref<PlainObjectTypeT,EIGENPY_DEFAULT_ALIGNMENT_VALUE,typename eigenpy::template StrideType<PlainObjectTypeT>::type> Base;
26+
2727
private:
2828
typedef Eigen::internal::traits<Base> Traits;
2929
template<typename Derived>
@@ -83,7 +83,7 @@ namespace eigenpy
8383
}; // struct Ref<PlainObjectType>
8484
}
8585

86-
#if not EIGEN_VERSION_AT_LEAST(3,2,90)
86+
#if !EIGEN_VERSION_AT_LEAST(3,2,90)
8787
#undef EIGEN_DEVICE_FUNC
8888
#endif
8989

0 commit comments

Comments
 (0)