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

Header-only mode broken when including fmt/printf.h #354

Closed
ghost opened this issue Jul 11, 2016 · 2 comments
Closed

Header-only mode broken when including fmt/printf.h #354

ghost opened this issue Jul 11, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 11, 2016

This problem occurs in the latest master, since the change where the printf function declarations were pulled out into a separate header (fmt/printf.h).

In trying to use the fmt::printf function in header-only mode (by defining FMT_HEADER_ONLY), I get the following error (using clang on OS X):

format.cc:507:10: error: out-of-line definition of 'fprintf' does not match any declaration in namespace 'fmt'

The problem is that while fmt/printf.h provides the required declaration, format.cc ends up being included before the declaration via fmt/format.h (which is included near the top of fmt/printf.h).

I tried to work a fix but anything I come up with ends up being quite complicated. Hopefully there's a simple solution for this.

@vitaut
Copy link
Contributor

vitaut commented Jul 12, 2016

Fixed in 0d5ef5c.

@vitaut vitaut closed this as completed Jul 12, 2016
@vitaut
Copy link
Contributor

vitaut commented Jul 12, 2016

Thanks for reporting!

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

1 participant