Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix MSVC build errors #70

Merged
merged 3 commits into from
Jun 15, 2019
Merged

Fix MSVC build errors #70

merged 3 commits into from
Jun 15, 2019

Conversation

jlblancoc
Copy link
Member

Please, find some fixes trying to make GTSAM/develop to build under MSVC2017 again.

Pay special attention to this commit. It was required to fix the following error. After unrolling the stack of template instantiations, I think the change makes (sort of) sense...

1>D:\code\gtsam\gtsam\gtsam/base/GenericValue.h(171): error C2678: binary '=': no operator found which takes a left-hand operand of type 'const gtsam::Cal3_S2' (or there is no acceptable conversion)
1>D:\code\gtsam\gtsam\gtsam/geometry/Cal3_S2.h(234): note: could be 'gtsam::Cal3_S2 &gtsam::Cal3_S2::operator =(gtsam::Cal3_S2 &&)'
1>D:\code\gtsam\gtsam\gtsam/geometry/Cal3_S2.h(234): note: or       'gtsam::Cal3_S2 &gtsam::Cal3_S2::operator =(const gtsam::Cal3_S2 &)'
1>D:\code\gtsam\gtsam\gtsam/base/GenericValue.h(171): note: while trying to match the argument list '(const gtsam::Cal3_S2, const gtsam::Cal3_S2)'
1>D:\code\gtsam\gtsam\gtsam/base/GenericValue.h(169): note: while compiling class template member function 'gtsam::GenericValue<ValueType> &gtsam::GenericValue<ValueType>::operator =(const gtsam::GenericValue<ValueType> &)'
1>        with
1>        [
1>            ValueType=gtsam::Cal3_S2
1>        ]
1>D:\code\gtsam\gtsam\gtsam/base/GenericValue.h(161): note: see reference to function template instantiation 'gtsam::GenericValue<ValueType> &gtsam::GenericValue<ValueType>::operator =(const gtsam::GenericValue<ValueType> &)' being compiled
1>        with
1>        [
1>            ValueType=gtsam::Cal3_S2
1>        ]
1>D:\code\gtsam\gtsam\gtsam/nonlinear/Values-inl.h(67): note: see reference to class template instantiation 'gtsam::GenericValue<ValueType>' being compiled
1>        with
1>        [
1>            ValueType=gtsam::Cal3_S2
1>        ]
1>D:\code\gtsam\gtsam\gtsam/nonlinear/Values-inl.h(63): note: while compiling class template member function 'gtsam::_ValuesConstKeyValuePair<ValueType> gtsam::ValuesCastHelper<const ValueType,gtsam::_ValuesConstKeyValuePair<ValueType>,gtsam::Values::ConstKeyValuePair>::cast(KeyValuePairType)'
1>        with
1>        [
1>            ValueType=gtsam::Cal3_S2,
1>            KeyValuePairType=gtsam::Values::ConstKeyValuePair
1>        ]
1>D:\code\gtsam\gtsam\gtsam/nonlinear/Values-inl.h(143): note: see reference to function template instantiation 'gtsam::_ValuesConstKeyValuePair<ValueType> gtsam::ValuesCastHelper<const ValueType,gtsam::_ValuesConstKeyValuePair<ValueType>,gtsam::Values::ConstKeyValuePair>::cast(KeyValuePairType)' being compiled
1>        with
1>        [
1>            ValueType=gtsam::Cal3_S2,
1>            KeyValuePairType=gtsam::Values::ConstKeyValuePair
1>        ]
1>D:\code\gtsam\gtsam\gtsam/nonlinear/Values-inl.h(149): note: see reference to class template instantiation 'gtsam::ValuesCastHelper<const ValueType,gtsam::_ValuesConstKeyValuePair<ValueType>,gtsam::Values::ConstKeyValuePair>' being compiled
1>        with
1>        [
1>            ValueType=gtsam::Cal3_S2
1>        ]
1>D:\code\gtsam\gtsam\gtsam/nonlinear/Values-inl.h(134): note: while compiling class template member function 'gtsam::Values::Filtered<gtsam::Cal3_S2>::Filtered(const boost::function<bool (const gtsam::Values::ConstKeyValuePair &)> &,gtsam::Values &)'
1>D:\code\gtsam\gtsam\gtsam/nonlinear/Values-inl.h(245): note: see reference to function template instantiation 'gtsam::Values::Filtered<gtsam::Cal3_S2>::Filtered(const boost::function<bool (const gtsam::Values::ConstKeyValuePair &)> &,gtsam::Values &)' being compiled
1>D:\code\gtsam\gtsam\gtsam_unstable\examples\ConcurrentCalibration.cpp(149): note: see reference to class template instantiation 'gtsam::Values::Filtered<gtsam::Cal3_S2>' being compiled
1>C:\local\boost_1_64_0\boost/bind/placeholders.hpp(54): note: see reference to class template instantiation 'boost::arg<9>' being compiled
1>C:\local\boost_1_64_0\boost/bind/placeholders.hpp(53): note: see reference to class template instantiation 'boost::arg<8>' being compiled
1>C:\local\boost_1_64_0\boost/bind/placeholders.hpp(52): note: see reference to class template instantiation 'boost::arg<7>' being compiled
1>C:\local\boost_1_64_0\boost/bind/placeholders.hpp(51): note: see reference to class template instantiation 'boost::arg<6>' being compiled
1>C:\local\boost_1_64_0\boost/bind/placeholders.hpp(50): note: see reference to class template instantiation 'boost::arg<5>' being compiled
1>C:\local\boost_1_64_0\boost/bind/placeholders.hpp(49): note: see reference to class template instantiation 'boost::arg<4>' being compiled
1>C:\local\boost_1_64_0\boost/bind/placeholders.hpp(48): note: see reference to class template instantiation 'boost::arg<3>' being compiled
1>C:\local\boost_1_64_0\boost/bind/placeholders.hpp(47): note: see reference to class template instantiation 'boost::arg<2>' being compiled
1>C:\local\boost_1_64_0\boost/bind/placeholders.hpp(46): note: see reference to class template instantiation 'boost::arg<1>' being compiled
1>Done building project "ConcurrentCalibration.vcxproj" -- FAILED.

Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, glad to know it compiles with so little changes. Would be nice if we could add windows to CI, but boost is not among packages installed in early version: https://docs.travis-ci.com/user/reference/windows/

@dellaert
Copy link
Member

Feel free to merge and then rebase other one...

@jlblancoc jlblancoc merged commit 391d8b9 into borglab:develop Jun 15, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants