Sophus
Sophus copied to clipboard
Syntax Error with VS2019 in several headers
Describe the bug Sophus is not building under Windows 10 MSVC2019 with the following cmake command:
cmake .. -DSOPHUS_USE_BASIC_LOGGING=ON -DBUILD_SOPHUS_TESTS=ON -DBUILD_SOPHUS_EXAMPLES=ON
due to the following error:
error C2059: syntax error: ')'
in several files, among these files:
interpolate.hpp(30,1)
so3.hpp(725,1)
geometry.hpp(71,1)
...
To Reproduce
- Use Windows 10, install MSVC2019
- Clone this repo
- Build with above cmake command
Expected behavior
It should build without error.
Sophus version: commit hash
Latest commit: 8e1941677ef214aab0397608f42b18fbe1a19885
Additional context
Seems to be related to SOPHUS_ENSURE(...)
Edit: 0422cad3d65f4cfb27014286e1a630e774c9d218 seems to be working fine.
I'm also facing this issue :
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.33.31630.0
-- The CXX compiler identification is MSVC 19.33.31630.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMake version: 3.25.2
-- Found Eigen3: C:/Program Files/eigen3 (Required is at least version "3.3.0")
-- Turning basic logging ON
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/ivizzo/Desktop/Sophus/build
and the build log:
MSBuild version 17.3.1+2badb37d1 for .NET Framework
Checking Build System
Building Custom Rule C:/Users/ivizzo/Desktop/Sophus/examples/CMakeLists.txt
HelloSO3.cpp
C:\Users\ivizzo\Desktop\Sophus\sophus\so3.hpp(725,1): error C2059: syntax error: ',' [C:\Users\ivizzo\Desktop\Sophus\bu
ild\examples\HelloSO3.vcxproj]
C:\Users\ivizzo\Desktop\Sophus\sophus\so3.hpp(695): message : while compiling class template member function 'Sophus::S
O3<double,0> Sophus::SO3<double,0>::expAndTheta(const Eigen::Matrix<double,3,1,0,3,1> &,double *)' [C:\Users\ivizzo\Des
ktop\Sophus\build\examples\HelloSO3.vcxproj]
...
This is a duplicate of #436
Closing, see #436 - also windows is not officially supported until somebody donates a PR with windows CI coverage.