问题
使用cmake+vs2019配置openmvs的时候,编译不通过,boost库出现了问题:
libboost_program_options-vc142-mt-gd-x64-1_71.lib(value_semantic.obj) : error LNK2005: “public: __cdecl boost::program_options::error_with_option_name::error_with_option_name(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &,int)” (??0error_with_option_name@program_options@boost@@QEAA@AEBV?
b
a
s
i
c
s
t
r
i
n
g
@
D
U
?
basic_string@DU?
basicstring@DU?char_traits@D@std@@V?$allocator@D@2@@std@@00H@Z) 已经在 boost_program_options-vc142-mt-gd-x64-1_71.lib(boost_program_options-vc142-mt-gd-x64-1_71.dll) 中定义
解决方法
在属性里面删除对应boost的依赖库
删除后
生成成功
完
--------------------------------------------------------------------------------------------诺有缸的高飞鸟202105