stonier/sophus

compiling error with VS2013

Closed this issue · 2 comments

Hello,

I am trying to use your Sophus on Windows 7. The IDE installed is VS2013 (update 5) which does not support C++11 so well that 'constexpr' is not available in VS2013. Then I find your version of Sophus and build it with cmake. Unfortunately, I got an error as below

1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------ 1> Checking Build System 1> CMake does not need to re-run because D:/Sophus/buildvs2013/CMakeFiles/generate.stamp is up-to-date. 2>------ Build started: Project: test_rxso3, Configuration: Debug Win32 ------ 3>------ Build started: Project: test_se2, Configuration: Debug Win32 ------ 4>------ Build started: Project: test_se3, Configuration: Debug Win32 ------ 5>------ Build started: Project: test_sim3, Configuration: Debug Win32 ------ 2> Building Custom Rule D:/Sophus/source/CMakeLists.txt 2> CMake does not need to re-run because D:\Sophus\buildvs2013\CMakeFiles\generate.stamp is up-to-date. 3> Building Custom Rule D:/Sophus/source/CMakeLists.txt 2> Microsoft (R) C/C++ Optimizing Compiler Version 18.00.40629 for x86 2> Copyright (C) Microsoft Corporation. All rights reserved. 2> 2> cl /c /I"C:\Program Files (x86)\PCL 1.7.2\3rdParty\Eigen\eigen3" /I"C:\Program Files (x86)\GnuWin32\include\gsl" /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"test_rxso3.dir\Debug\\" /Fd"test_rxso3.dir\Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt D:\Sophus\source\sophus\test_rxso3.cpp 2> 2> test_rxso3.cpp 3> CMake does not need to re-run because D:\Sophus\buildvs2013\CMakeFiles\generate.stamp is up-to-date. 4> Building Custom Rule D:/Sophus/source/CMakeLists.txt 5> Building Custom Rule D:/Sophus/source/CMakeLists.txt 4> CMake does not need to re-run because D:\Sophus\buildvs2013\CMakeFiles\generate.stamp is up-to-date. 3> Microsoft (R) C/C++ Optimizing Compiler Version 18.00.40629 for x86 3> Copyright (C) Microsoft Corporation. All rights reserved. 3> 3> cl /c /I"C:\Program Files (x86)\PCL 1.7.2\3rdParty\Eigen\eigen3" /I"C:\Program Files (x86)\GnuWin32\include\gsl" /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"test_se2.dir\Debug\\" /Fd"test_se2.dir\Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt D:\Sophus\source\sophus\test_se2.cpp 3> 3> test_se2.cpp 5> CMake does not need to re-run because D:\Sophus\buildvs2013\CMakeFiles\generate.stamp is up-to-date. 2>d:\sophus\source\sophus\rxso3.hpp(35): error C2144: syntax error : 'int' should be preceded by ';' 2>d:\sophus\source\sophus\rxso3.hpp(35): warning C4091: '' : ignored on left of 'int' when no variable is declared 4> Microsoft (R) C/C++ Optimizing Compiler Version 18.00.40629 for x86 4> Copyright (C) Microsoft Corporation. All rights reserved. 4> 4> cl /c /I"C:\Program Files (x86)\PCL 1.7.2\3rdParty\Eigen\eigen3" /I"C:\Program Files (x86)\GnuWin32\include\gsl" /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"test_se3.dir\Debug\\" /Fd"test_se3.dir\Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt D:\Sophus\source\sophus\test_se3.cpp 4> 4> test_se3.cpp 6>------ Build started: Project: test_so2, Configuration: Debug Win32 ------ 5> Microsoft (R) C/C++ Optimizing Compiler Version 18.00.40629 for x86 5> Copyright (C) Microsoft Corporation. All rights reserved. 5> 5> cl /c /I"C:\Program Files (x86)\PCL 1.7.2\3rdParty\Eigen\eigen3" /I"C:\Program Files (x86)\GnuWin32\include\gsl" /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"test_sim3.dir\Debug\\" /Fd"test_sim3.dir\Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt D:\Sophus\source\sophus\test_sim3.cpp 5> 5> test_sim3.cpp 6> Building Custom Rule D:/Sophus/source/CMakeLists.txt 3>d:\sophus\source\sophus\so2.hpp(36): error C2144: syntax error : 'int' should be preceded by ';' 3>d:\sophus\source\sophus\so2.hpp(36): warning C4091: '' : ignored on left of 'int' when no variable is declared 3>d:\sophus\source\sophus\se2.hpp(34): error C2144: syntax error : 'int' should be preceded by ';' 3>d:\sophus\source\sophus\se2.hpp(34): warning C4091: '' : ignored on left of 'int' when no variable is declared 6> CMake does not need to re-run because D:\Sophus\buildvs2013\CMakeFiles\generate.stamp is up-to-date. 4>d:\sophus\source\sophus\se3.hpp(35): error C2144: syntax error : 'int' should be preceded by ';' 4>d:\sophus\source\sophus\se3.hpp(35): warning C4091: '' : ignored on left of 'int' when no variable is declared 5>d:\sophus\source\sophus\rxso3.hpp(35): error C2144: syntax error : 'int' should be preceded by ';' 5>d:\sophus\source\sophus\rxso3.hpp(35): warning C4091: '' : ignored on left of 'int' when no variable is declared 5>d:\sophus\source\sophus\sim3.hpp(34): error C2144: syntax error : 'int' should be preceded by ';' 5>d:\sophus\source\sophus\sim3.hpp(34): warning C4091: '' : ignored on left of 'int' when no variable is declared 7>------ Build started: Project: test_so3, Configuration: Debug Win32 ------ 7> Building Custom Rule D:/Sophus/source/CMakeLists.txt 7> CMake does not need to re-run because D:\Sophus\buildvs2013\CMakeFiles\generate.stamp is up-to-date. 6> Microsoft (R) C/C++ Optimizing Compiler Version 18.00.40629 for x86 6> Copyright (C) Microsoft Corporation. All rights reserved. 6> 6> cl /c /I"C:\Program Files (x86)\PCL 1.7.2\3rdParty\Eigen\eigen3" /I"C:\Program Files (x86)\GnuWin32\include\gsl" /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"test_so2.dir\Debug\\" /Fd"test_so2.dir\Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt D:\Sophus\source\sophus\test_so2.cpp 6> 6> test_so2.cpp 6>d:\sophus\source\sophus\so2.hpp(36): error C2144: syntax error : 'int' should be preceded by ';' 6>d:\sophus\source\sophus\so2.hpp(36): warning C4091: '' : ignored on left of 'int' when no variable is declared 7> Microsoft (R) C/C++ Optimizing Compiler Version 18.00.40629 for x86 7> Copyright (C) Microsoft Corporation. All rights reserved. 7> 7> cl /c /I"C:\Program Files (x86)\PCL 1.7.2\3rdParty\Eigen\eigen3" /I"C:\Program Files (x86)\GnuWin32\include\gsl" /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"test_so3.dir\Debug\\" /Fd"test_so3.dir\Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt D:\Sophus\source\sophus\test_so3.cpp 7> 7> test_so3.cpp 7>D:\Sophus\source\sophus\test_so3.cpp(59): error C2065: 'M_PI_2' : undeclared identifier 7> D:\Sophus\source\sophus\test_so3.cpp(79) : see reference to function template instantiation 'void tests<double>(void)' being compiled 7>D:\Sophus\source\sophus\test_so3.cpp(41): warning C4305: 'argument' : truncation from 'double' to 'const float' 7> D:\Sophus\source\sophus\test_so3.cpp(82) : see reference to function template instantiation 'void tests<float>(void)' being compiled 7>D:\Sophus\source\sophus\test_so3.cpp(42): warning C4305: 'argument' : truncation from 'double' to 'const float' 7>D:\Sophus\source\sophus\test_so3.cpp(43): warning C4305: 'argument' : truncation from 'double' to 'const float' 7>D:\Sophus\source\sophus\test_so3.cpp(44): warning C4305: 'argument' : truncation from 'double' to 'const float' 7>D:\Sophus\source\sophus\test_so3.cpp(46): warning C4305: 'argument' : truncation from 'double' to 'const float' 7>D:\Sophus\source\sophus\test_so3.cpp(47): warning C4305: 'argument' : truncation from 'double' to 'const float' 7>D:\Sophus\source\sophus\test_so3.cpp(48): warning C4305: 'argument' : truncation from 'double' to 'const float' 7>D:\Sophus\source\sophus\test_so3.cpp(49): warning C4305: 'argument' : truncation from 'double' to 'const float' 7>D:\Sophus\source\sophus\test_so3.cpp(50): warning C4305: 'argument' : truncation from 'double' to 'const float' 7>D:\Sophus\source\sophus\test_so3.cpp(51): warning C4305: 'argument' : truncation from 'double' to 'const float' 7>D:\Sophus\source\sophus\test_so3.cpp(52): warning C4305: 'argument' : truncation from 'double' to 'const float' 7>D:\Sophus\source\sophus\test_so3.cpp(53): warning C4305: 'argument' : truncation from 'double' to 'const float' 8>------ Build started: Project: ALL_BUILD, Configuration: Debug Win32 ------ 8> Building Custom Rule D:/Sophus/source/CMakeLists.txt 8> CMake does not need to re-run because D:\Sophus\buildvs2013\CMakeFiles\generate.stamp is up-to-date. ========== Build: 2 succeeded, 6 failed, 0 up-to-date, 0 skipped ==========

Sorry, do not have the resources or time to support older platforms, nor windows. If you work it out though, happy to receive a PR.

Hello Stonier,

I have already compiled it on Windows 7 but the modification is not so good that is not enough for a PR. Thanks for your reply.