Probably you must add these lines to any .cpp file:
namespace Luing
{
std::shared_ptr<spdlog::logger> Log::s_CoreLogger;
}
Give details about Luing, Log, s_CoreLogger if it does not help.
It is also possible to use a new form of inline.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
these errors keep appearing
-------------------------------------------------------------------------------------------------------------------------------
LNK2001: unresolved external symbol "private: static class std::shared_ptr<class spdlog::logger> Luing::Log::s_CoreLogger" (?s_CoreLogger@Loughborough @Luing@@0V?$shared_ptr@Vlogger@spdlog@@@std@@A)
-------------------------------------------------------------------------------------------------------------------------------
LNK2001: unresolved external symbol "private: static class std::shared_ptr<class spdlog::logger> Luing::Log::s_ClientLogger" (?s_ClientLogger@Loughborough @Luing@@0V?$shared_ptr@Vlogger@spdlog@@@std@@A)
-------------------------------------------------------------------------------------------------------------------------------
plz help
Probably you must add these lines to any .cpp file:
namespace Luing
{
std::shared_ptr<spdlog::logger> Log::s_CoreLogger;
}
Give details about Luing, Log, s_CoreLogger if it does not help.
It is also possible to use a new form of inline.
You are using C++ to call some library that has a Luing::Log class. You have included the appropriate header file so the compiler can find the definition and compile. However during the linking phase when the linker is looking for the actual implementation it cannot find it and fails the call with the given error. In most cases you are missing a LIB reference in your linker settings. Go to the linker settings in your project and then to the Input tab. Under Additional Dependencies is the list of LIB files that are linked. You need to ensure that whatever library you're using is in this list. Note that the dependencies are per configuration/platform so you'll need to do this for each of your mappings.
You might also consider looking to see if the library is provided via vcpkg. If so then that would be the preferred route.
Did you find the solution?
Please help me!