vcg-uvic / viper

Open-source code for VIPER -- Volume Invariant Position-based Elastic Rods
Apache License 2.0
903 stars 105 forks source link

make it visual studio compliant #2

Open ahmidou opened 4 years ago

ahmidou commented 4 years ago

Could we have the option to build on windows visual studio? I'm getting errors with Eigen related to the = operator:

D:/externalLibs/viper/Viper/CudaSolver.cu(137): error : function "Eigen::Quaternion<_Scalar, _Options>::operator=(const Eigen::Quaternion<float, 0> &) [with _Scalar=float, _Options=0]" (declared implicitly) cannot be referenced -- it is a deleted function

drebain commented 4 years ago

There are also some additional things that would need to be changed in Subprocess.h that are currently Unix-specific to implement Windows support. We're not currently developing this, but if someone has modified it to be cross-platform, I'd be happy to accept a PR.

besoft commented 3 years ago

Compilation error related to the Eigen = operator is caused by the fact that CudaSolver.cu is compiled by NVCC compiler instead of MSVC compiler. As _MSC_VER > 1900 is defined at the same time, the definition of operator = valid for Visual Studio 2019+ is used. Unfortunately, this definition is unsupported by NVCC.