Closed YanzhaoW closed 1 month ago
You're right. My mistake. Can you please create a PR that adds the #include
statement?
Hi,
Sorry I'm not familiar with the program structure of this project and have no idea how cista.h
is stitched together. So I think it's better to have someone who already had some experience add the #include
statement. :D
@YanzhaoW It depends on the fmt ostream. Please include the fmt ostream header before using cista, as shown in the following example:
#include <fmt/ostream.h>
#include "cista.h"
The idea was that it does not depend on libfmt but it is compatible if libfmt is available. So it was my mistake to only check for the include but not actually include it. @zhoupengwei your work around won't be necessary anymore after this is fixed. I just didn't find the time to add the #include
statements after the __has_include
checks.
I added #include <fmt/ostream.h> before including cista.h. Still can't get it compiled. Is it gonna be fixed at any time
You can just remove fmt
completely or have a version that has ostream_formatter
. Then it works.
Maybe additionally a version check is required.
I think it would be nice if use fmt or not can be a compile option. I tried to regenerate the header file from source, failed again cuz of fmtlib.
I added a CISTA_FMT
flag.
Hi,
I'm using this library downloaded from Conan center, which use
cista.h
single header file.I got an error with a hello world example:
The error is:
I digged into the header file and it's caused by
I think
__has_include
just means whether the header file is capable to be included, instead of whether the library has been already included.