VC中引入libcef后编译过程中出现如下问题
---------------------------------------------------------------------------------------------------------------------------------------
1>正在链接...
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) 已经在 libcef_dll_wrapper.lib(v8handler_cpptoc.obj) 中定义
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) 已经在 libcef_dll_wrapper.lib(v8handler_cpptoc.obj) 中定义
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) 已经在 libcef_dll_wrapper.lib(v8handler_cpptoc.obj) 中定义
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (??1_Container_base_secure@std@@QAE@XZ) 已经在 libcef_dll_wrapper.lib(v8handler_cpptoc.obj) 中定义
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ) 已经在 libcef_dll_wrapper.lib(v8handler_cpptoc.obj) 中定义
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (??0_Container_base_secure@std@@QAE@XZ) 已经在 libcef_dll_wrapper.lib(v8handler_cpptoc.obj) 中定义
1>LINK : warning LNK4098: 默认库“MSVCRT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
1>LINK : warning LNK4098: 默认库“LIBCMTD”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
1>..\bin\debug\VQDClient.exe : fatal error LNK1169: 找到一个或多个多重定义的符号
1>生成日志保存在“file://e:\项目工作\安检点客户端\触屏版本\VQDClient\bin\obj\BuildLog.htm”
1>VQDClient - 7 个错误,2 个警告
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
在 Visual Studio 开发环境中设置此链接器选项
打开项目的“属性页”对话框。 有关详细信息,请参见设置 Visual C++ 项目属性。
单击“链接器”文件夹。
单击“命令行”属性页。
将/FORCE:MULTIPLE选项键入“附加选项”框中。
---------------------------------------------------------------------------------------------------------------------------------------
1>正在链接...
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) 已经在 libcef_dll_wrapper.lib(v8handler_cpptoc.obj) 中定义
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) 已经在 libcef_dll_wrapper.lib(v8handler_cpptoc.obj) 中定义
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) 已经在 libcef_dll_wrapper.lib(v8handler_cpptoc.obj) 中定义
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (??1_Container_base_secure@std@@QAE@XZ) 已经在 libcef_dll_wrapper.lib(v8handler_cpptoc.obj) 中定义
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ) 已经在 libcef_dll_wrapper.lib(v8handler_cpptoc.obj) 中定义
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (??0_Container_base_secure@std@@QAE@XZ) 已经在 libcef_dll_wrapper.lib(v8handler_cpptoc.obj) 中定义
1>LINK : warning LNK4098: 默认库“MSVCRT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
1>LINK : warning LNK4098: 默认库“LIBCMTD”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
1>..\bin\debug\VQDClient.exe : fatal error LNK1169: 找到一个或多个多重定义的符号
1>生成日志保存在“file://e:\项目工作\安检点客户端\触屏版本\VQDClient\bin\obj\BuildLog.htm”
1>VQDClient - 7 个错误,2 个警告
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
在 Visual Studio 开发环境中设置此链接器选项
打开项目的“属性页”对话框。 有关详细信息,请参见设置 Visual C++ 项目属性。
单击“链接器”文件夹。
单击“命令行”属性页。
将/FORCE:MULTIPLE选项键入“附加选项”框中。