error C2079: '_' uses undefined struct 'fmt::v10::detail::type_is_unformattable_for<T,char>'
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);
}
}
bro,i have the same question, you fix it?
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 👍
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
thank you bro,do you have a url? i do not know how to get the discord
It's in the readme
thank you bro,do you have a url? i do not know how to get the discord
It's in the readme
Thank you!!!!!!!!!
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
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 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
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
Okay, thanks. I'll go back and try
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
Thank's bro, it work
Does anyone know how to solve this in the RegisterComponent() function in ScriptGlue.cpp ? None of the existing solutions seem applicable.
老哥,我也有同样的问题,你解决了吗?老哥,我也有同样的问题,你解决了吗?
不,我还没解决。您找到解决问题的信息了吗?有没有具体的时间我们可以找到信息来解决问题?谢谢不,我还没有解决。您找到解决问题的信息了吗?没有具体的时间我们可以找到解决问题的信息吗?谢谢
兄弟,我修好了,你可以用e.ToString()代替e兄弟,我修好了,你可以用e.ToString()代替e
好的,谢谢。我会回去试试
thank you this help
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
i dont think so, this defeats the purpose intended to, as in to pass the object as arg, and using the overloaded function for operater<<(Event e) definition, it must be able to change it to string automaticlly
here is the solution comment made in discord server. I am just forwarding it, hope it helps:
this worked with older version, I guess:
inline std::ostream& operator<<(std::ostream& os, const Event& e)
{
return os << e.ToString();
}
But for newer version we need to use this instead:
inline std::string format_as(const Event& e) {
return e.ToString();
}
i have tried this, and it works. hopefully we can close this issue :) Refernce: https://fmt.dev/latest/api/#udt
There are two ways to make a user-defined type formattable: providing a format_as function or specializing the formatter struct template. The format_as function should take an object of your type and return an object of a formattable type.
hey, I have this same problem except with the types glm::vec3, const std::filesystem::path, std::filesystem::path, and Hazel::UUID. how would i create the format_as functions for these?
edit: nvm fixed it myself 👍

