-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
How to use this library? #843
Comments
Please see http://fmt.dev/latest/usage.html and http://fmt.dev/latest/api.html. For As for the issue with |
Previously I tried to build the library with CMAKE but I still got a bunch of errors. I was wandering if there is an easier way like just using the header files? (more simple sort of step by step help). Thanks! |
The You can enable the header-only mode by defining the |
Thank you very much. I was able to use the fmt. I incorrectly understood that creating a library was needed. I see it is optional. |
Is there an example how to install and use this library? I have downloaded 5.0.0 release,
I am using DevC++ 5.11 to compile a simple program. I copied all headers and the src/format.cc files. Are there more steps needed? This is my code, when compiling I, get a bunch of errors.
Code:
#include
#include "fmt/format.h"
#include "fmt/ostream.h"
#include "fmt/core.h"
int main() {
fmt::print("The answer is {}.", 42);
return 0;
}
First error by compiler:
17 30 C:\Users\chris\fmt-5.0.0\include\fmt\time.h [Error] macro "localtime_r" requires 2 arguments, but only 1 given.
Code lines marked by compiler on time.h file:
#ifndef FMT_TIME_H_
#define FMT_TIME_H_
#include "format.h"
#include
FMT_BEGIN_NAMESPACE
namespace internal{
inline null<> localtime_r(...) { return null<>(); } // <-- ERROR IS MARKED HERE
inline null<> localtime_s(...) { return null<>(); }
inline null<> gmtime_r(...) { return null<>(); }
inline null<> gmtime_s(...) { return null<>(); }
}
Screenshot:
fmt_error
The text was updated successfully, but these errors were encountered: