Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error C2079: '_' uses undefined struct 'fmt::v10::detail::type_is_unformattable_for<T,char>' #3191

Closed
hoho965191737 opened this issue Sep 17, 2024 · 4 comments

Comments

@hoho965191737
Copy link

I wonder why? Thank you!
error C2079: '_' uses undefined struct 'fmt::v10::detail::type_is_unformattable_for<T,char>'
error C2338: Cannot format an argument. To make type T formattable provide a formatter specialization: https://fmt.dev/latest/api.html#udt

Log.h

#include <memory>
#include "Core.h"
#include "spdlog/spdlog.h"
#include "spdlog/fmt/ostr.h"

namespace Hazel {
	class HAZEL_API Log
	{
	public:
		static void Init();

		inline static std::shared_ptr<spdlog::logger>& GetCoreLogger() { return s_CoreLogger; }
		inline static std::shared_ptr<spdlog::logger>& GetClientLogger() { return s_ClientLogger; }
	private:
		static std::shared_ptr<spdlog::logger> s_CoreLogger;
		static std::shared_ptr<spdlog::logger> s_ClientLogger;
	};
}

Log.cpp

#include "Log.h"
#include "spdlog/sinks/stdout_color_sinks.h"


namespace Hazel {
	std::shared_ptr<spdlog::logger> Log::s_CoreLogger;
	std::shared_ptr<spdlog::logger> Log::s_ClientLogger;


	void Log::Init() {
		spdlog::set_pattern("%^[%T] %n:%v%$");
		s_CoreLogger = spdlog::stdout_color_mt("Hazel");
		s_CoreLogger->set_level(spdlog::level::trace);

		s_ClientLogger = spdlog::stdout_color_mt("App");
		s_ClientLogger->set_level(spdlog::level::trace);
	}
}

image

@tt4g
Copy link
Contributor

tt4g commented Sep 17, 2024

@tt4g
Copy link
Contributor

tt4g commented Sep 18, 2024

looks like the source code for https://github.com/TheCherno/Hazel project that I have seen in several Issue (#1505, #3054) in the past.
I recommend that you ask that question if it is a Hazel project issue.

@hoho965191737
Copy link
Author

looks like the source code for https://github.com/TheCherno/Hazel project that I have seen in several Issue (#1505, #3054) in the past.看起来像我在几个问题中看到的https://github.com/TheCherno/Hazel项目的源代码( #1505 , #3054 ) 在过去。 I recommend that you ask that question if it is a Hazel project issue.如果这是 Hazel 项目问题,我建议您提出这个问题。

Yes, it is a Hazel project issue. Thank you for your reply. Let me see if it works

@tt4g
Copy link
Contributor

tt4g commented Oct 5, 2024

TheCherno/Hazel#683

@gabime gabime closed this as completed Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants