introlab / rtabmap

RTAB-Map library and standalone application
https://introlab.github.io/rtabmap
Other
2.81k stars 787 forks source link

LNK2005: ... already defined in libboost_serialization-vc140-mt-1_62.lib #422

Open leoteo1 opened 5 years ago

leoteo1 commented 5 years ago

I've got error with boost library when I build "rtabmap_core", since there are several function have been declared in the same name of libboost_serialization-vc140-mt-1_62.lib and boost_serialization-vc140-mt-1_62.lib.

Severity Code Description Project File Line Suppression State Error LNK2005 "protected: void __cdecl boost::serialization::extended_type_info::key_unregister(void)const " (?key_unregister@extended_type_info@serialization@boost@@IEBAXXZ) already defined in libboost_serialization-vc140-mt-1_62.lib(extended_type_info.obj) rtabmap_core G:\Room scanning\rtabmap\rtabmap-master\build\corelib\src\boost_serialization-vc140-mt-1_62.lib(boost_serialization-vc140-mt-1_62.dll) 1

Can anyone tell me how to solve this probem? Thanks,

matlabbe commented 5 years ago

You can take a look at the appveyor script for Windows compilation: https://github.com/introlab/rtabmap/blob/master/.appveyor.yml

I am not sure why there is a boost_serialization-vc140-mt-1_62.lib in the src directory of rtabmap, as it should not.

leoteo1 commented 5 years ago

You can take a look at the appveyor script for Windows compilation: https://github.com/introlab/rtabmap/blob/master/.appveyor.yml

I am not sure why there is a boost_serialization-vc140-mt-1_62.lib in the src directory of rtabmap, as it should not.

I have successfully built project after re-path the Boost library in PCLConfig file to ”C:\PCL 1.8.1\boost_1_62_0\lib64-msvc-14.0". Thanks for your quick response!!