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>' #683

Open
hoho965191737 opened this issue Sep 19, 2024 · 9 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

@323931
Copy link

323931 commented Sep 22, 2024

bro,i have the same question, you fix it?

@VagueLobster
Copy link
Contributor

bro,i have the same question, you fix it?

There's a fix in Cherno's discord server in the Game-Engine-Series channel, but you might have to scroll up quite a bit 👍

@323931
Copy link

323931 commented Sep 22, 2024

bro,i have the same question, you fix it?

There's a fix in Cherno's discord server in the Game-Engine-Series channel, but you might have to scroll up quite a bit 👍

thank you bro,do you have a url? i do not know how to get the discord

@Kirdow
Copy link

Kirdow commented Sep 22, 2024

thank you bro,do you have a url? i do not know how to get the discord

It's in the readme

@323931
Copy link

323931 commented Sep 22, 2024

thank you bro,do you have a url? i do not know how to get the discord

It's in the readme

Thank you!!!!!!!!!

@hoho965191737
Copy link
Author

bro,i have the same question, you fix it?

There's a fix in Cherno's discord server in the Game-Engine-Series channel, but you might have to scroll up quite a bit 👍

No, I haven't solved it yet. Did you find the information that solved the problem? Is there a specific time when we can locate the information to solve the problem? Thank you

@hoho965191737
Copy link
Author

bro,i have the same question, you fix it?

No, I haven't solved it yet. Did you find the information that solved the problem? Is there a specific time when we can locate the information to solve the problem? Thank you

@323931
Copy link

323931 commented Sep 24, 2024

bro,i have the same question, you fix it?

No, I haven't solved it yet. Did you find the information that solved the problem? Is there a specific time when we can locate the information to solve the problem? Thank you

bro,i fixed it,you can use e.ToString() instead of e
微信图片_20240924111806

@hoho965191737
Copy link
Author

bro,i have the same question, you fix it?老哥,我也有同样的问题,你解决了吗?

No, I haven't solved it yet. Did you find the information that solved the problem? Is there a specific time when we can locate the information to solve the problem? Thank you不,我还没解决。您找到解决问题的信息了吗?有没有具体的时间我们可以找到信息来解决问题?谢谢

bro,i fixed it,you can use e.ToString() instead of e兄弟,我修好了,你可以用 e.ToString() 代替 e 微信图片_20240924111806

Okay, thanks. I'll go back and try

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

4 participants