jmorton06 / Lumos

Cross-Platform C++ 2D/3D game engine
MIT License
1.21k stars 130 forks source link

Build link error #112

Open YouthImagination opened 1 year ago

YouthImagination commented 1 year ago

I can't build Lumos successfully. VS2022 show output:

Build started...
1>------ Build started: Project: Runtime, Configuration: Release x64 ------
2>------ Build started: Project: LumosEditor, Configuration: Release x64 ------
1>Lumos.lib(spdlog.obj) : error LNK2005: "public: __cdecl spdlog::details::log_msg::log_msg(struct spdlog::source_loc,class fmt::v8::basic_string_view<char>,enum spdlog::level::level_enum,class fmt::v8::basic_string_view<char>)" (??0log_msg@details@spdlog@@QEAA@Usource_loc@2@V?$basic_string_view@D@v8@fmt@@W4level_enum@level@2@1@Z) already defined in spdlog.lib(spdlog.dll)
1>Lumos.lib(spdlog.obj) : error LNK2005: "public: bool __cdecl spdlog::details::backtracer::enabled(void)const " (?enabled@backtracer@details@spdlog@@QEBA_NXZ) already defined in spdlog.lib(spdlog.dll)
1>Lumos.lib(spdlog.obj) : error LNK2005: "protected: void __cdecl spdlog::logger::err_handler_(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?err_handler_@logger@spdlog@@IEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in spdlog.lib(spdlog.dll)
1>Lumos.lib(spdlog.obj) : error LNK2005: "protected: void __cdecl spdlog::logger::log_it_(struct spdlog::details::log_msg const &,bool,bool)" (?log_it_@logger@spdlog@@IEAAXAEBUlog_msg@details@2@_N1@Z) already defined in spdlog.lib(spdlog.dll)
2>Lumos.lib(spdlog.obj) : error LNK2005: "public: __cdecl spdlog::sinks::base_sink<class std::mutex>::base_sink<class std::mutex>(void)" (??0?$base_sink@Vmutex@std@@@sinks@spdlog@@QEAA@XZ) already defined in spdlog.lib(spdlog.dll)
2>Lumos.lib(spdlog.obj) : error LNK2005: "public: __cdecl spdlog::details::log_msg::log_msg(struct spdlog::source_loc,class fmt::v8::basic_string_view<char>,enum spdlog::level::level_enum,class fmt::v8::basic_string_view<char>)" (??0log_msg@details@spdlog@@QEAA@Usource_loc@2@V?$basic_string_view@D@v8@fmt@@W4level_enum@level@2@1@Z) already defined in spdlog.lib(spdlog.dll)
2>Lumos.lib(spdlog.obj) : error LNK2005: "public: bool __cdecl spdlog::details::backtracer::enabled(void)const " (?enabled@backtracer@details@spdlog@@QEBA_NXZ) already defined in spdlog.lib(spdlog.dll)
2>Lumos.lib(spdlog.obj) : error LNK2005: "protected: void __cdecl spdlog::logger::err_handler_(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?err_handler_@logger@spdlog@@IEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in spdlog.lib(spdlog.dll)
2>Lumos.lib(spdlog.obj) : error LNK2005: "public: virtual void __cdecl spdlog::sinks::base_sink<class std::mutex>::flush(void)" (?flush@?$base_sink@Vmutex@std@@@sinks@spdlog@@UEAAXXZ) already defined in spdlog.lib(spdlog.dll)
2>Lumos.lib(spdlog.obj) : error LNK2005: "public: virtual void __cdecl spdlog::sinks::base_sink<class std::mutex>::log(struct spdlog::details::log_msg const &)" (?log@?$base_sink@Vmutex@std@@@sinks@spdlog@@UEAAXAEBUlog_msg@details@3@@Z) already defined in spdlog.lib(spdlog.dll)
2>Lumos.lib(spdlog.obj) : error LNK2005: "protected: void __cdecl spdlog::logger::log_it_(struct spdlog::details::log_msg const &,bool,bool)" (?log_it_@logger@spdlog@@IEAAXAEBUlog_msg@details@2@_N1@Z) already defined in spdlog.lib(spdlog.dll)
2>Lumos.lib(spdlog.obj) : error LNK2005: "public: virtual void __cdecl spdlog::sinks::base_sink<class std::mutex>::set_formatter(class std::unique_ptr<class spdlog::formatter,struct std::default_delete<class spdlog::formatter> >)" (?set_formatter@?$base_sink@Vmutex@std@@@sinks@spdlog@@UEAAXV?$unique_ptr@Vformatter@spdlog@@U?$default_delete@Vformatter@spdlog@@@std@@@std@@@Z) already defined in spdlog.lib(spdlog.dll)
2>Lumos.lib(spdlog.obj) : error LNK2005: "protected: virtual void __cdecl spdlog::sinks::base_sink<class std::mutex>::set_formatter_(class std::unique_ptr<class spdlog::formatter,struct std::default_delete<class spdlog::formatter> >)" (?set_formatter_@?$base_sink@Vmutex@std@@@sinks@spdlog@@MEAAXV?$unique_ptr@Vformatter@spdlog@@U?$default_delete@Vformatter@spdlog@@@std@@@std@@@Z) already defined in spdlog.lib(spdlog.dll)
2>Lumos.lib(spdlog.obj) : error LNK2005: "public: virtual void __cdecl spdlog::sinks::base_sink<class std::mutex>::set_pattern(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?set_pattern@?$base_sink@Vmutex@std@@@sinks@spdlog@@UEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in spdlog.lib(spdlog.dll)
2>Lumos.lib(spdlog.obj) : error LNK2005: "protected: virtual void __cdecl spdlog::sinks::base_sink<class std::mutex>::set_pattern_(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?set_pattern_@?$base_sink@Vmutex@std@@@sinks@spdlog@@MEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in spdlog.lib(spdlog.dll)
2>Lumos.lib(fmt.obj) : error LNK2005: "int __cdecl fmt::v8::detail::format_float<double>(double,int,struct fmt::v8::detail::float_specs,class fmt::v8::detail::buffer<char> &)" (??$format_float@N@detail@v8@fmt@@YAHNHUfloat_specs@012@AEAV?$buffer@D@012@@Z) already defined in fmt.lib(fmt.dll)
2>Lumos.lib(fmt.obj) : error LNK2005: "char __cdecl fmt::v8::detail::decimal_point_impl<char>(class fmt::v8::detail::locale_ref)" (??$decimal_point_impl@D@detail@v8@fmt@@YADVlocale_ref@012@@Z) already defined in fmt.lib(fmt.dll)
1>Lumos.lib(fmt.obj) : error LNK2005: "int __cdecl fmt::v8::detail::format_float<double>(double,int,struct fmt::v8::detail::float_specs,class fmt::v8::detail::buffer<char> &)" (??$format_float@N@detail@v8@fmt@@YAHNHUfloat_specs@012@AEAV?$buffer@D@012@@Z) already defined in fmt.lib(fmt.dll)
2>Lumos.lib(fmt.obj) : error LNK2005: "int __cdecl fmt::v8::detail::format_float<long double>(long double,int,struct fmt::v8::detail::float_specs,class fmt::v8::detail::buffer<char> &)" (??$format_float@O@detail@v8@fmt@@YAHOHUfloat_specs@012@AEAV?$buffer@D@012@@Z) already defined in fmt.lib(fmt.dll)
2>Lumos.lib(fmt.obj) : error LNK2005: "int __cdecl fmt::v8::detail::snprintf_float<double>(double,int,struct fmt::v8::detail::float_specs,class fmt::v8::detail::buffer<char> &)" (??$snprintf_float@N@detail@v8@fmt@@YAHNHUfloat_specs@012@AEAV?$buffer@D@012@@Z) already defined in fmt.lib(fmt.dll)
2>Lumos.lib(fmt.obj) : error LNK2005: "int __cdecl fmt::v8::detail::snprintf_float<long double>(long double,int,struct fmt::v8::detail::float_specs,class fmt::v8::detail::buffer<char> &)" (??$snprintf_float@O@detail@v8@fmt@@YAHOHUfloat_specs@012@AEAV?$buffer@D@012@@Z) already defined in fmt.lib(fmt.dll)
2>Lumos.lib(fmt.obj) : error LNK2005: "struct fmt::v8::detail::thousands_sep_result<char> __cdecl fmt::v8::detail::thousands_sep_impl<char>(class fmt::v8::detail::locale_ref)" (??$thousands_sep_impl@D@detail@v8@fmt@@YA?AU?$thousands_sep_result@D@012@Vlocale_ref@012@@Z) already defined in fmt.lib(fmt.dll)
2>Lumos.lib(fmt.obj) : error LNK2005: "struct fmt::v8::detail::dragonbox::decimal_fp<float> __cdecl fmt::v8::detail::dragonbox::to_decimal<float>(float)" (??$to_decimal@M@dragonbox@detail@v8@fmt@@YA?AU?$decimal_fp@M@0123@M@Z) already defined in fmt.lib(fmt.dll)
2>Lumos.lib(fmt.obj) : error LNK2005: "struct fmt::v8::detail::dragonbox::decimal_fp<double> __cdecl fmt::v8::detail::dragonbox::to_decimal<double>(double)" (??$to_decimal@N@dragonbox@detail@v8@fmt@@YA?AU?$decimal_fp@N@0123@N@Z) already defined in fmt.lib(fmt.dll)
2>Lumos.lib(fmt.obj) : error LNK2005: "void __cdecl fmt::v8::detail::assert_fail(char const *,int,char const *)" (?assert_fail@detail@v8@fmt@@YAXPEBDH0@Z) already defined in fmt.lib(fmt.dll)
2>Lumos.lib(fmt.obj) : error LNK2005: "public: void __cdecl fmt::v8::detail::error_handler::on_error(char const *)" (?on_error@error_handler@detail@v8@fmt@@QEAAXPEBD@Z) already defined in fmt.lib(fmt.dll)
2>Lumos.lib(fmt.obj) : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl fmt::v8::vformat(class fmt::v8::basic_string_view<char>,class fmt::v8::basic_format_args<class fmt::v8::basic_format_context<class fmt::v8::appender,char> >)" (?vformat@v8@fmt@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$basic_string_view@D@12@V?$basic_format_args@V?$basic_format_context@Vappender@v8@fmt@@D@v8@fmt@@@12@@Z) already defined in fmt.lib(fmt.dll)
1>Lumos.lib(fmt.obj) : error LNK2005: "char __cdecl fmt::v8::detail::decimal_point_impl<char>(class fmt::v8::detail::locale_ref)" (??$decimal_point_impl@D@detail@v8@fmt@@YADVlocale_ref@012@@Z) already defined in fmt.lib(fmt.dll)
1>Lumos.lib(fmt.obj) : error LNK2005: "int __cdecl fmt::v8::detail::format_float<long double>(long double,int,struct fmt::v8::detail::float_specs,class fmt::v8::detail::buffer<char> &)" (??$format_float@O@detail@v8@fmt@@YAHOHUfloat_specs@012@AEAV?$buffer@D@012@@Z) already defined in fmt.lib(fmt.dll)
1>Lumos.lib(fmt.obj) : error LNK2005: "int __cdecl fmt::v8::detail::snprintf_float<double>(double,int,struct fmt::v8::detail::float_specs,class fmt::v8::detail::buffer<char> &)" (??$snprintf_float@N@detail@v8@fmt@@YAHNHUfloat_specs@012@AEAV?$buffer@D@012@@Z) already defined in fmt.lib(fmt.dll)
1>Lumos.lib(fmt.obj) : error LNK2005: "int __cdecl fmt::v8::detail::snprintf_float<long double>(long double,int,struct fmt::v8::detail::float_specs,class fmt::v8::detail::buffer<char> &)" (??$snprintf_float@O@detail@v8@fmt@@YAHOHUfloat_specs@012@AEAV?$buffer@D@012@@Z) already defined in fmt.lib(fmt.dll)
1>Lumos.lib(fmt.obj) : error LNK2005: "struct fmt::v8::detail::thousands_sep_result<char> __cdecl fmt::v8::detail::thousands_sep_impl<char>(class fmt::v8::detail::locale_ref)" (??$thousands_sep_impl@D@detail@v8@fmt@@YA?AU?$thousands_sep_result@D@012@Vlocale_ref@012@@Z) already defined in fmt.lib(fmt.dll)
1>Lumos.lib(fmt.obj) : error LNK2005: "struct fmt::v8::detail::dragonbox::decimal_fp<float> __cdecl fmt::v8::detail::dragonbox::to_decimal<float>(float)" (??$to_decimal@M@dragonbox@detail@v8@fmt@@YA?AU?$decimal_fp@M@0123@M@Z) already defined in fmt.lib(fmt.dll)
1>Lumos.lib(fmt.obj) : error LNK2005: "struct fmt::v8::detail::dragonbox::decimal_fp<double> __cdecl fmt::v8::detail::dragonbox::to_decimal<double>(double)" (??$to_decimal@N@dragonbox@detail@v8@fmt@@YA?AU?$decimal_fp@N@0123@N@Z) already defined in fmt.lib(fmt.dll)
1>Lumos.lib(fmt.obj) : error LNK2005: "void __cdecl fmt::v8::detail::assert_fail(char const *,int,char const *)" (?assert_fail@detail@v8@fmt@@YAXPEBDH0@Z) already defined in fmt.lib(fmt.dll)
1>Lumos.lib(fmt.obj) : error LNK2005: "public: void __cdecl fmt::v8::detail::error_handler::on_error(char const *)" (?on_error@error_handler@detail@v8@fmt@@QEAAXPEBD@Z) already defined in fmt.lib(fmt.dll)
1>Lumos.lib(fmt.obj) : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl fmt::v8::vformat(class fmt::v8::basic_string_view<char>,class fmt::v8::basic_format_args<class fmt::v8::basic_format_context<class fmt::v8::appender,char> >)" (?vformat@v8@fmt@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$basic_string_view@D@12@V?$basic_format_args@V?$basic_format_context@Vappender@v8@fmt@@D@v8@fmt@@@12@@Z) already defined in fmt.lib(fmt.dll)
2>fmt.lib(fmt.dll) : error LNK2005: "void __cdecl fmt::v8::format_system_error(class fmt::v8::detail::buffer<char> &,int,char const *)" (?format_system_error@v8@fmt@@YAXAEAV?$buffer@D@detail@12@HPEBD@Z) already defined in Lumos.lib(fmt.obj)
1>fmt.lib(fmt.dll) : error LNK2005: "void __cdecl fmt::v8::format_system_error(class fmt::v8::detail::buffer<char> &,int,char const *)" (?format_system_error@v8@fmt@@YAXAEAV?$buffer@D@detail@12@HPEBD@Z) already defined in Lumos.lib(fmt.obj)
1>   Creating library ..\bin\Release-windows-x86_64\Runtime.lib and object ..\bin\Release-windows-x86_64\Runtime.exp
2>   Creating library ..\bin\Release-windows-x86_64\LumosEditor.lib and object ..\bin\Release-windows-x86_64\LumosEditor.exp
2>..\bin\Release-windows-x86_64\LumosEditor.exe : fatal error LNK1169: one or more multiply defined symbols found
1>..\bin\Release-windows-x86_64\Runtime.exe : fatal error LNK1169: one or more multiply defined symbols found
1>Done building project "Runtime.vcxproj" -- FAILED.
2>Done building project "LumosEditor.vcxproj" -- FAILED.
========== Build: 0 succeeded, 2 failed, 10 up-to-date, 0 skipped ==========
========== Build started at 5:13 PM and took 31.712 seconds ==========