在c++项目中使用spdlog

如何解决在c++项目中使用spdlog

在对代码进行一些操作后,出现链接错误

Severity    Code    Description Project File    Line    Suppression State
Error   LNK2019 unresolved external symbol "__declspec(dllimport) void __cdecl fmt::v7::format_system_error(class fmt::v7::detail::buffer<char> &,int,class fmt::v7::basic_string_view<char>)" (__imp_?format_system_error@v7@fmt@@YAXAEAV?$buffer@D@detail@12@HV?$basic_string_view@D@12@@Z) referenced in function "public: __cdecl spdlog::spdlog_ex::spdlog_ex(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (??0spdlog_ex@spdlog@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)   testLVGL    C:\cpp_test\testLVGL\boiler_ui2.obj 1   
Error   LNK2001 unresolved external symbol "__declspec(dllimport) void __cdecl fmt::v7::format_system_error(class fmt::v7::detail::buffer<char> &,class fmt::v7::basic_string_view<char>)" (__imp_?format_system_error@v7@fmt@@YAXAEAV?$buffer@D@detail@12@HV?$basic_string_view@D@12@@Z)   testLVGL    C:\cpp_test\testLVGL\State.obj  1   
Error   LNK2019 unresolved external symbol "__declspec(dllimport) void __cdecl fmt::v7::detail::assert_fail(char const *,char const *)" (__imp_?assert_fail@detail@v7@fmt@@YAXPEBDH0@Z) referenced in function "struct fmt::v7::detail::format_decimal_result<char *> __cdecl fmt::v7::detail::format_decimal<char,unsigned int>(char *,unsigned int,int)" (??$format_decimal@DI@detail@v7@fmt@@YA?AU?$format_decimal_result@PEAD@012@PEADIH@Z) testLVGL    C:\cpp_test\testLVGL\boiler_ui2.obj 1   
Error   LNK2001 unresolved external symbol "__declspec(dllimport) void __cdecl fmt::v7::detail::assert_fail(char const *,char const *)" (__imp_?assert_fail@detail@v7@fmt@@YAXPEBDH0@Z) testLVGL    C:\cpp_test\testLVGL\State.obj  1   
Error   LNK2019 unresolved external symbol "__declspec(dllimport) public: static unsigned __int64 const * const fmt::v7::detail::basic_data<void>::zero_or_powers_of_10_64_new" (__imp_?zero_or_powers_of_10_64_new@?$basic_data@X@detail@v7@fmt@@2QB_KB) referenced in function "int __cdecl fmt::v7::detail::count_digits(unsigned __int64)" (?count_digits@detail@v7@fmt@@YAH_K@Z)   testLVGL    C:\cpp_test\testLVGL\boiler_ui2.obj 1   
Error   LNK2001 unresolved external symbol "__declspec(dllimport) public: static unsigned __int64 const * const fmt::v7::detail::basic_data<void>::zero_or_powers_of_10_64_new" (__imp_?zero_or_powers_of_10_64_new@?$basic_data@X@detail@v7@fmt@@2QB_KB)   testLVGL    C:\cpp_test\testLVGL\State.obj  1   
Error   LNK2019 unresolved external symbol "__declspec(dllimport) public: static unsigned int const * const fmt::v7::detail::basic_data<void>::zero_or_powers_of_10_32_new" (__imp_?zero_or_powers_of_10_32_new@?$basic_data@X@detail@v7@fmt@@2QBIB) referenced in function "int __cdecl fmt::v7::detail::count_digits(unsigned int)" (?count_digits@detail@v7@fmt@@YAHI@Z) testLVGL    C:\cpp_test\testLVGL\boiler_ui2.obj 1   
Error   LNK2001 unresolved external symbol "__declspec(dllimport) public: static unsigned int const * const fmt::v7::detail::basic_data<void>::zero_or_powers_of_10_32_new" (__imp_?zero_or_powers_of_10_32_new@?$basic_data@X@detail@v7@fmt@@2QBIB)    testLVGL    C:\cpp_test\testLVGL\State.obj  1   
Error   LNK2019 unresolved external symbol "__declspec(dllimport) public: static char const (* fmt::v7::detail::basic_data<void>::digits)[2]" (__imp_?digits@?$basic_data@X@detail@v7@fmt@@2QAY01$$CBDA) referenced in function "struct fmt::v7::detail::format_decimal_result<char *> __cdecl fmt::v7::detail::format_decimal<char,int)" (??$format_decimal@DI@detail@v7@fmt@@YA?AU?$format_decimal_result@PEAD@012@PEADIH@Z)    testLVGL    C:\cpp_test\testLVGL\boiler_ui2.obj 1   
Error   LNK2001 unresolved external symbol "__declspec(dllimport) public: static char const (* fmt::v7::detail::basic_data<void>::digits)[2]" (__imp_?digits@?$basic_data@X@detail@v7@fmt@@2QAY01$$CBDA)    testLVGL    C:\cpp_test\testLVGL\State.obj  1   
Error   LNK2019 unresolved external symbol "void __cdecl fmt::v7::detail::vformat_to<char>(class fmt::v7::detail::buffer<char> &,class fmt::v7::basic_string_view<char>,class fmt::v7::basic_format_args<class fmt::v7::basic_format_context<class fmt::v7::detail::buffer_appender<char>,char> >,class fmt::v7::detail::locale_ref)" (??$vformat_to@D@detail@v7@fmt@@YAXAEAV?$buffer@D@012@V?$basic_string_view@D@12@V?$basic_format_args@V?$basic_format_context@V?$buffer_appender@D@detail@v7@fmt@@D@v7@fmt@@@12@Vlocale_ref@012@@Z) referenced in function "class fmt::v7::detail::buffer_appender<char> __cdecl fmt::v7::format_to<char [6],int &,250,char>(class fmt::v7::basic_memory_buffer<char,class std::allocator<char> > &,char const (&)[6],int &)" (??$format_to@$$BY05DAEAH$0PK@D@v7@fmt@@YA?AV?$buffer_appender@D@detail@01@AEAV?$basic_memory_buffer@D$0PK@V?$allocator@D@std@@@01@AEAY05$$CBDAEAH@Z)    testLVGL    C:\cpp_test\testLVGL\boiler_ui2.obj 1   
Error   LNK2001 unresolved external symbol "void __cdecl fmt::v7::detail::vformat_to<char>(class fmt::v7::detail::buffer<char> &,class fmt::v7::detail::locale_ref)" (??$vformat_to@D@detail@v7@fmt@@YAXAEAV?$buffer@D@012@V?$basic_string_view@D@12@V?$basic_format_args@V?$basic_format_context@V?$buffer_appender@D@detail@v7@fmt@@D@v7@fmt@@@12@Vlocale_ref@012@@Z)    testLVGL    C:\cpp_test\testLVGL\State.obj  1   

在谷歌搜索时,我发现这可能与 fmt 库有关。我没有直接在我的项目中使用 fmt,但它可能被 spdlog 使用。如何理解哪个系统正在搜索而无法链接?如何解决这个问题?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?
Java在半透明框架/面板/组件上重新绘画。
Java“ Class.forName()”和“ Class.forName()。newInstance()”之间有什么区别?
在此环境中不提供编译器。也许是在JRE而不是JDK上运行?
Java用相同的方法在一个类中实现两个接口。哪种接口方法被覆盖?
Java 什么是Runtime.getRuntime()。totalMemory()和freeMemory()?
java.library.path中的java.lang.UnsatisfiedLinkError否*****。dll
JavaFX“位置是必需的。” 即使在同一包装中
Java 导入两个具有相同名称的类。怎么处理?
Java 是否应该在HttpServletResponse.getOutputStream()/。getWriter()上调用.close()?
Java RegEx元字符(。)和普通点?