fix/msvc2017 Not Building With Default Choices

Issue #394 new
Mike Sheffler created an issue

I pulled fix/msvc2017 and tried building without changing anything. CMake:

GTSAM_SOURCE_ROOT_DIR: [P:/gtsam]
Boost version: 1.67.0
Found the following Boost libraries:
  serialization
  system
  filesystem
  thread
  program_options
  date_time
  timer
  chrono
  regex
  atomic
Ignoring Boost restriction on optional lvalue assignment from rvalues
[Warning] FindTBB.cmake: The use of TBB_ARCHITECTURE and TBB_COMPILER is deprecated and may not be supported in future versions. Please set $ENV{TBB_ARCH_PLATFORM} (using tbbvars.[bat|csh|sh]).
TBB: Intel TBB NOT found!
TBB: Looked for Threading Building Blocks in C:/Program Files/Intel/TBB
Could NOT find MKL (missing: MKL_INCLUDE_DIR MKL_LIBRARIES) 
Building 3rdparty
Building base
Building geometry
Building inference
Building symbolic
Building discrete
Building linear
Building nonlinear
Building sam
Building sfm
Building slam
Building smart
Building navigation
Adding precompiled header for MSVC
GTSAM Version: 4.0.0
Install prefix: C:/GTSAM/Gtsam-4.0
Building GTSAM - shared
Building base_unstable
Building geometry_unstable
Building linear_unstable
Building discrete_unstable
Building dynamics_unstable
Building nonlinear_unstable
Building slam_unstable
GTSAM_UNSTABLE Version: 4.0.0
Install prefix: C:/GTSAM/Gtsam-4.0
Building GTSAM_UNSTABLE - shared
Wrote P:/gtsam/build/GTSAMConfig.cmake
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
===============================================================
================  Configuration Options  ======================
  CMAKE_CXX_COMPILER_ID type     : MSVC
  CMAKE_CXX_COMPILER_VERSION     : 19.15.26732.1
Build flags                                               
  Build Tests                    : Enabled
  Build examples with 'make all' : Enabled
  Build timing scripts with 'make all': Disabled
  Build static GTSAM library instead of shared: Disabled
  Put build type in library name : Enabled
  Build libgtsam_unstable        : Enabled
  Use System Eigen               : No
  Use Intel TBB                  : TBB not found
  Eigen will use MKL             : MKL not found
  Eigen will use MKL and OpenMP  : OpenMP found but MKL not found
  Default allocator              : STL
Packaging flags                                               
  CPack Source Generator         : TGZ
  CPack Generator                : TGZ
GTSAM flags                                               
  Quaternions as default Rot3     : Disabled
  Runtime consistency checking    : Disabled
  Rot3 retract is full ExpMap     : Disabled
  Pose3 retract is full ExpMap    : Disabled
  Deprecated in GTSAM 4 allowed   : Enabled
  Point3 is typedef to Vector3    : Disabled
  Metis-based Nested Dissection   : Enabled
  Use tangent-space preintegration: Enabled
MATLAB toolbox flags                                      
  Install matlab toolbox         : Disabled
  Build Wrap                     : Enabled
Python module flags                                       
  Build python module            : Disabled
Cython toolbox flags                                      
  Install Cython toolbox         : Disabled
  Build Wrap                     : Enabled
===============================================================
CMake Warning at CMakeLists.txt:551 (message):
  TBB was not found - this is ok, but note that GTSAM parallelization will be
  disabled.  Set GTSAM_WITH_TBB to 'Off' to avoid this warning.


CMake Warning at CMakeLists.txt:554 (message):
  MKL was not found - this is ok, but note that MKL yields better
  performance.  Set GTSAM_WITH_EIGEN_MKL to 'Off' to disable this warning.


Configuring done

the first message with an error that I see is an example:

------ Build started: Project: SmartRangeExample_plaza1, Configuration: Release x64 ------
SmartRangeExample_plaza1.cpp
p:\gtsam\gtsam\base\genericvalue.h(152): error C2027: use of undefined type 'gtsam::traits<T>'
        with
        [
            T=gtsam::Point2
        ]
p:\gtsam\gtsam\base\genericvalue.h(152): note: see declaration of 'gtsam::traits<T>'
        with
        [
            T=gtsam::Point2
        ]
p:\gtsam\gtsam\base\genericvalue.h(151): note: while compiling class template member function 'size_t gtsam::GenericValue<ValueType>::dim(void) const'
        with
        [
            ValueType=gtsam::Point2
        ]
p:\gtsam\gtsam\nonlinear\values-inl.h(68): note: see reference to class template instantiation 'gtsam::GenericValue<ValueType>' being compiled
        with
        [
            ValueType=gtsam::Point2
        ]
p:\gtsam\gtsam\nonlinear\values-inl.h(64): note: while compiling class template member function 'CastedKeyValuePairType gtsam::ValuesCastHelper<const ValueType,CastedKeyValuePairType,gtsam::Values::ConstKeyValuePair>::cast(KeyValuePairType)'
        with
        [
            CastedKeyValuePairType=gtsam::_ValuesConstKeyValuePair<gtsam::Point2>,
            ValueType=gtsam::Point2,
            KeyValuePairType=gtsam::Values::ConstKeyValuePair
        ]
p:\gtsam\gtsam\nonlinear\values-inl.h(144): note: see reference to function template instantiation 'CastedKeyValuePairType gtsam::ValuesCastHelper<const ValueType,CastedKeyValuePairType,gtsam::Values::ConstKeyValuePair>::cast(KeyValuePairType)' being compiled
        with
        [
            CastedKeyValuePairType=gtsam::_ValuesConstKeyValuePair<gtsam::Point2>,
            ValueType=gtsam::Point2,
            KeyValuePairType=gtsam::Values::ConstKeyValuePair
        ]
p:\gtsam\gtsam\nonlinear\values-inl.h(150): note: see reference to class template instantiation 'gtsam::ValuesCastHelper<const ValueType,gtsam::_ValuesConstKeyValuePair<ValueType>,gtsam::Values::ConstKeyValuePair>' being compiled
        with
        [
            ValueType=gtsam::Point2
        ]
p:\gtsam\gtsam\nonlinear\values-inl.h(135): note: while compiling class template member function 'gtsam::Values::Filtered<ValueType>::Filtered(const boost::function<bool (const gtsam::Values::ConstKeyValuePair &)> &,gtsam::Values &)'
        with
        [
            ValueType=gtsam::Point2
        ]
p:\gtsam\gtsam\nonlinear\values-inl.h(246): note: see reference to function template instantiation 'gtsam::Values::Filtered<ValueType>::Filtered(const boost::function<bool (const gtsam::Values::ConstKeyValuePair &)> &,gtsam::Values &)' being compiled
        with
        [
            ValueType=gtsam::Point2
        ]
p:\gtsam\gtsam\nonlinear\values-inl.h(174): note: see reference to class template instantiation 'gtsam::Values::Filtered<ValueType>' being compiled
        with
        [
            ValueType=gtsam::Point2
        ]
p:\gtsam\gtsam_unstable\examples\smartrangeexample_plaza1.cpp(235): note: see reference to class template instantiation 'gtsam::Values::ConstFiltered<gtsam::Point2>' being compiled
c:\local\boost_1_67_0\boost\bind\placeholders.hpp(54): note: see reference to class template instantiation 'boost::arg<9>' being compiled
c:\local\boost_1_67_0\boost\bind\placeholders.hpp(53): note: see reference to class template instantiation 'boost::arg<8>' being compiled
c:\local\boost_1_67_0\boost\bind\placeholders.hpp(52): note: see reference to class template instantiation 'boost::arg<7>' being compiled
c:\local\boost_1_67_0\boost\bind\placeholders.hpp(51): note: see reference to class template instantiation 'boost::arg<6>' being compiled
c:\local\boost_1_67_0\boost\bind\placeholders.hpp(50): note: see reference to class template instantiation 'boost::arg<5>' being compiled
c:\local\boost_1_67_0\boost\bind\placeholders.hpp(49): note: see reference to class template instantiation 'boost::arg<4>' being compiled
c:\local\boost_1_67_0\boost\bind\placeholders.hpp(48): note: see reference to class template instantiation 'boost::arg<3>' being compiled
c:\local\boost_1_67_0\boost\bind\placeholders.hpp(47): note: see reference to class template instantiation 'boost::arg<2>' being compiled
c:\local\boost_1_67_0\boost\bind\placeholders.hpp(46): note: see reference to class template instantiation 'boost::arg<1>' being compiled
c:\local\boost_1_67_0\boost\math\constants\constants.hpp(278): note: see reference to class template instantiation 'boost::math::constants::detail::constant_pi<T>' being compiled
        with
        [
            T=double
        ]
c:\local\boost_1_67_0\boost\math\constants\constants.hpp(278): note: see reference to function template instantiation 'double boost::math::constants::pi<T,boost::math::policies::policy<boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy>>(void) noexcept' being compiled
        with
        [
            T=double
        ]
p:\gtsam\gtsam\geometry\rot2.h(62): note: see reference to function template instantiation 'double boost::math::constants::pi<double>(void) noexcept' being compiled
p:\gtsam\gtsam\base\genericvalue.h(152): error C3861: 'GetDimension': identifier not found
Done building project "SmartRangeExample_plaza1.vcxproj" -- FAILED.

Let me know if I should change any options in CMake. To try to match your setup.

EDIT: 2018-11-08 2113 PST This is just choosing Build Solution, by the way. If there is a specific target I should try building, let me know.

Comments (9)

  1. Frank Dellaert

    Weird. This is using cmake-gui, externally, using the MSVC generators, correct? And then you click "open project" and build?

  2. Frank Dellaert

    I just pushed an update where I merged develop (fixed two conflicts, but no bug-fixing needed otherwise), deleted my cache, and re-configured with default settings. I stopped compiling after all examples were done, but despite the alignment warnings (see other issue #393) gtsam, gtsam_unstable, and all examples compiled fine.

  3. Mike Sheffler reporter

    Sounds good. I pulled, cleared my cache, re-configured default, and am building now. Just to be clear, the 'generator' I'm using in cmake-gui is 'Visual Studio 15 2017 Win64'. Should I be using the not-Win64 one?

  4. Mike Sheffler reporter

    I still see that first example having a problem:

    ------ Build started: Project: SmartRangeExample_plaza1, Configuration: Release x64 ------
    SmartRangeExample_plaza1.cpp
    p:\gtsam\gtsam\base\genericvalue.h(152): error C2027: use of undefined type 'gtsam::traits<T>'
            with
            [
                T=gtsam::Point2
            ]
    p:\gtsam\gtsam\base\genericvalue.h(152): note: see declaration of 'gtsam::traits<T>'
            with
            [
                T=gtsam::Point2
            ]
    p:\gtsam\gtsam\base\genericvalue.h(151): note: while compiling class template member function 'size_t gtsam::GenericValue<ValueType>::dim(void) const'
            with
            [
                ValueType=gtsam::Point2
            ]
    p:\gtsam\gtsam\nonlinear\values-inl.h(68): note: see reference to class template instantiation 'gtsam::GenericValue<ValueType>' being compiled
            with
            [
                ValueType=gtsam::Point2
            ]
    p:\gtsam\gtsam\nonlinear\values-inl.h(64): note: while compiling class template member function 'CastedKeyValuePairType gtsam::ValuesCastHelper<const ValueType,CastedKeyValuePairType,gtsam::Values::ConstKeyValuePair>::cast(KeyValuePairType)'
            with
            [
                CastedKeyValuePairType=gtsam::_ValuesConstKeyValuePair<gtsam::Point2>,
                ValueType=gtsam::Point2,
                KeyValuePairType=gtsam::Values::ConstKeyValuePair
            ]
    p:\gtsam\gtsam\nonlinear\values-inl.h(144): note: see reference to function template instantiation 'CastedKeyValuePairType gtsam::ValuesCastHelper<const ValueType,CastedKeyValuePairType,gtsam::Values::ConstKeyValuePair>::cast(KeyValuePairType)' being compiled
            with
            [
                CastedKeyValuePairType=gtsam::_ValuesConstKeyValuePair<gtsam::Point2>,
                ValueType=gtsam::Point2,
                KeyValuePairType=gtsam::Values::ConstKeyValuePair
            ]
    p:\gtsam\gtsam\nonlinear\values-inl.h(150): note: see reference to class template instantiation 'gtsam::ValuesCastHelper<const ValueType,gtsam::_ValuesConstKeyValuePair<ValueType>,gtsam::Values::ConstKeyValuePair>' being compiled
            with
            [
                ValueType=gtsam::Point2
            ]
    p:\gtsam\gtsam\nonlinear\values-inl.h(135): note: while compiling class template member function 'gtsam::Values::Filtered<ValueType>::Filtered(const boost::function<bool (const gtsam::Values::ConstKeyValuePair &)> &,gtsam::Values &)'
            with
            [
                ValueType=gtsam::Point2
            ]
    p:\gtsam\gtsam\nonlinear\values-inl.h(246): note: see reference to function template instantiation 'gtsam::Values::Filtered<ValueType>::Filtered(const boost::function<bool (const gtsam::Values::ConstKeyValuePair &)> &,gtsam::Values &)' being compiled
            with
            [
                ValueType=gtsam::Point2
            ]
    p:\gtsam\gtsam\nonlinear\values-inl.h(174): note: see reference to class template instantiation 'gtsam::Values::Filtered<ValueType>' being compiled
            with
            [
                ValueType=gtsam::Point2
            ]
    p:\gtsam\gtsam_unstable\examples\smartrangeexample_plaza1.cpp(235): note: see reference to class template instantiation 'gtsam::Values::ConstFiltered<gtsam::Point2>' being compiled
    c:\local\boost_1_67_0\boost\bind\placeholders.hpp(54): note: see reference to class template instantiation 'boost::arg<9>' being compiled
    c:\local\boost_1_67_0\boost\bind\placeholders.hpp(53): note: see reference to class template instantiation 'boost::arg<8>' being compiled
    c:\local\boost_1_67_0\boost\bind\placeholders.hpp(52): note: see reference to class template instantiation 'boost::arg<7>' being compiled
    c:\local\boost_1_67_0\boost\bind\placeholders.hpp(51): note: see reference to class template instantiation 'boost::arg<6>' being compiled
    c:\local\boost_1_67_0\boost\bind\placeholders.hpp(50): note: see reference to class template instantiation 'boost::arg<5>' being compiled
    c:\local\boost_1_67_0\boost\bind\placeholders.hpp(49): note: see reference to class template instantiation 'boost::arg<4>' being compiled
    c:\local\boost_1_67_0\boost\bind\placeholders.hpp(48): note: see reference to class template instantiation 'boost::arg<3>' being compiled
    c:\local\boost_1_67_0\boost\bind\placeholders.hpp(47): note: see reference to class template instantiation 'boost::arg<2>' being compiled
    c:\local\boost_1_67_0\boost\bind\placeholders.hpp(46): note: see reference to class template instantiation 'boost::arg<1>' being compiled
    c:\local\boost_1_67_0\boost\math\constants\constants.hpp(278): note: see reference to class template instantiation 'boost::math::constants::detail::constant_pi<T>' being compiled
            with
            [
                T=double
            ]
    c:\local\boost_1_67_0\boost\math\constants\constants.hpp(278): note: see reference to function template instantiation 'double boost::math::constants::pi<T,boost::math::policies::policy<boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy>>(void) noexcept' being compiled
            with
            [
                T=double
            ]
    p:\gtsam\gtsam\geometry\rot2.h(62): note: see reference to function template instantiation 'double boost::math::constants::pi<double>(void) noexcept' being compiled
    p:\gtsam\gtsam\base\genericvalue.h(152): error C3861: 'GetDimension': identifier not found
    Done building project "SmartRangeExample_plaza1.vcxproj" -- FAILED.
    

    After letting all of the compilation run its course, I right-click on gtsam and select Build. I see

    ========== Build: 0 succeeded, 0 failed, 3 up-to-date, 0 skipped ==========
    

    Similarly, doing same for gtsam_unstable says

    ========== Build: 0 succeeded, 0 failed, 4 up-to-date, 0 skipped ==========
    

    Trying that on examples, I see the error posted above for example SmartRangeExample_plaza1 and similar errors for SmartRangeExample_plaza2 (I can post them too, if you like). At the end, it says

    ========== Build: 0 succeeded, 2 failed, 50 up-to-date, 0 skipped ==========
    

    So, I believe gtsam, gtsam_unstable, and all of the other examples are building okay.

  5. Frank Dellaert

    Hmmm, don't know what to say. The SmartRange examples compile for me on Mac and on Windows, with default options. I have seen these errors before but I fixed them a while ago, I thought. Super-sure you're on the latest version of the branch, and you have no old installed version of gtsam somewhere that it could be including?

  6. Mike Sheffler reporter

    Super-sure you're on the latest version of the branch

    Yeah. From when you merged in develop earlier today.

    and you have no old installed version of gtsam somewhere that it could be including?

    I'll try deleting the entire install prefix and entire build directory and give it another go.

  7. Mike Sheffler reporter

    Hmm. I nuked everything I could think of, and I got the same error for the Release build. With Debug, I get a lot of link problems too, like

    ------ Build started: Project: gtsam_unstable, Configuration: Debug x64 ------
    gtsamDebug.lib(gtsamDebug.dll) : error LNK2005: "public: static class Eigen::CwiseNullaryOp<struct Eigen::internal::scalar_constant_op<double>,class Eigen::Matrix<double,2,1,0,2,1> > const __cdecl Eigen::DenseBase<class Eigen::Matrix<double,2,1,0,2,1> >::Zero(void)" (?Zero@?$DenseBase@V?$Matrix@N$01$00$0A@$01$00@Eigen@@@Eigen@@SA?BV?$CwiseNullaryOp@U?$scalar_constant_op@N@internal@Eigen@@V?$Matrix@N$01$00$0A@$01$00@3@@2@XZ) already defined in Event.obj
    gtsamDebug.lib(gtsamDebug.dll) : error LNK2005: "public: class Eigen::Matrix<double,3,1,0,3,1> & __cdecl Eigen::EigenBase<class Eigen::Matrix<double,3,1,0,3,1> >::derived(void)" (?derived@?$EigenBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QEAAAEAV?$Matrix@N$02$00$0A@$02$00@2@XZ) already defined in SimPolygon2D.obj
    gtsamDebug.lib(gtsamDebug.dll) : error LNK2005: "public: class Eigen::Matrix<double,3,1,0,3,1> const & __cdecl Eigen::EigenBase<class Eigen::Matrix<double,3,1,0,3,1> >::derived(void)const " (?derived@?$EigenBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QEBAAEBV?$Matrix@N$02$00$0A@$02$00@2@XZ) already defined in SimPolygon2D.obj
    gtsamDebug.lib(gtsamDebug.dll) : error LNK2005: "public: class Eigen::Matrix<double,3,1,0,3,1> & __cdecl Eigen::EigenBase<class Eigen::Matrix<double,3,1,0,3,1> >::const_cast_derived(void)const " (?const_cast_derived@?$EigenBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QEBAAEAV?$Matrix@N$02$00$0A@$02$00@2@XZ) already defined in SimPolygon2D.obj
    gtsamDebug.lib(gtsamDebug.dll) : error LNK2005: "public: __int64 __cdecl Eigen::DenseCoeffsBase<class Eigen::Matrix<double,3,1,0,3,1>,3>::outerStride(void)const " (?outerStride@?$DenseCoeffsBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@$02@Eigen@@QEBA_JXZ) already defined in SimPolygon2D.obj
    gtsamDebug.lib(gtsamDebug.dll) : error LNK2005: "public: static class Eigen::CwiseNullaryOp<struct Eigen::internal::scalar_constant_op<double>,class Eigen::Matrix<double,3,1,0,3,1> > const __cdecl Eigen::DenseBase<class Eigen::Matrix<double,3,1,0,3,1> >::Zero(void)" (?Zero@?$DenseBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@SA?BV?$CwiseNullaryOp@U?$scalar_constant_op@N@internal@Eigen@@V?$Matrix@N$02$00$0A@$02$00@3@@2@XZ) already defined in SimPolygon2D.obj
    gtsamDebug.lib(gtsamDebug.dll) : error LNK2005: "public: __int64 __cdecl Eigen::PlainObjectBase<class Eigen::Matrix<double,3,1,0,3,1> >::rows(void)const " (?rows@?$PlainObjectBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QEBA_JXZ) already defined in SimPolygon2D.obj
    gtsamDebug.lib(gtsamDebug.dll) : error LNK2005: "public: __int64 __cdecl Eigen::PlainObjectBase<class Eigen::Matrix<double,3,1,0,3,1> >::cols(void)const " (?cols@?$PlainObjectBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QEBA_JXZ) already defined in SimPolygon2D.obj
    gtsamDebug.lib(gtsamDebug.dll) : error LNK2005: "public: double const * __cdecl Eigen::PlainObjectBase<class Eigen::Matrix<double,3,1,0,3,1> >::data(void)const " (?data@?$PlainObjectBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QEBAPEBNXZ) already defined in SimPolygon2D.obj
    gtsamDebug.lib(gtsamDebug.dll) : error LNK2005: "public: void __cdecl Eigen::PlainObjectBase<class Eigen::Matrix<double,3,1,0,3,1> >::resize(__int64,__int64)" (?resize@?$PlainObjectBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QEAAX_J0@Z) already defined in SimPolygon2D.obj
    gtsamDebug.lib(gtsamDebug.dll) : error LNK2005: "public: static void __cdecl Eigen::PlainObjectBase<class Eigen::Matrix<double,3,1,0,3,1> >::_check_template_params(void)" (?_check_template_params@?$PlainObjectBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@SAXXZ) already defined in SimPolygon2D.obj
    gtsamDebug.lib(gtsamDebug.dll) : error LNK2005: "public: __int64 __cdecl Eigen::Matrix<double,3,1,0,3,1>::outerStride(void)const " (?outerStride@?$Matrix@N$02$00$0A@$02$00@Eigen@@QEBA_JXZ) already defined in SimPolygon2D.obj
    gtsamDebug.lib(gtsamDebug.dll) : error LNK2005: "protected: __cdecl Eigen::MatrixBase<class Eigen::Matrix<double,3,1,0,3,1> >::MatrixBase<class Eigen::Matrix<double,3,1,0,3,1> >(void)" (??0?$MatrixBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@IEAA@XZ) already defined in SimPolygon2D.obj
    gtsamDebug.lib(gtsamDebug.dll) : error LNK2005: "public: __int64 __cdecl Eigen::EigenBase<class Eigen::Matrix<double,3,1,0,3,1> >::rows(void)const " (?rows@?$EigenBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QEBA_JXZ) already defined in SimPolygon2D.obj
    gtsamDebug.lib(gtsamDebug.dll) : error LNK2005: "public: __int64 __cdecl Eigen::EigenBase<class Eigen::Matrix<double,3,1,0,3,1> >::cols(void)const " (?cols@?$EigenBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QEBA_JXZ) already defined in SimPolygon2D.obj
    gtsamDebug.lib(gtsamDebug.dll) : error LNK2005: "public: double & __cdecl Eigen::PlainObjectBase<class Eigen::Matrix<double,3,1,0,3,1> >::coeffRef(__int64)" (?coeffRef@?$PlainObjectBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QEAAAEAN_J@Z) already defined in SimPolygon2D.obj
    gtsamDebug.lib(gtsamDebug.dll) : error LNK2005: "public: __int64 __cdecl Eigen::EigenBase<class Eigen::Matrix<double,3,1,0,3,1> >::size(void)const " (?size@?$EigenBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QEBA_JXZ) already defined in SimPolygon2D.obj
       Creating library P:/gtsam/build/lib/Debug/gtsam_unstableDebug.lib and object P:/gtsam/build/lib/Debug/gtsam_unstableDebug.exp
    P:\gtsam\build\bin\Debug\gtsam_unstableDebug.dll : fatal error LNK1169: one or more multiply defined symbols found
    Done building project "gtsam_unstable.vcxproj" -- FAILED.
    

    I'm not sure what I could be doing wrong, but having symbol redefinition in the link screams old .lib / .obj code or a mis-matched configuration (e.g., something release vs something debug).

    I'm just going to assume I have leftovers ... somewhere, and set it aside for now.

  8. Log in to comment