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

Conflicts between CoreServices and spdlog on Mac OS X #113

Closed
Kentzo opened this issue Jul 26, 2015 · 5 comments
Closed

Conflicts between CoreServices and spdlog on Mac OS X #113

Kentzo opened this issue Jul 26, 2015 · 5 comments

Comments

@Kentzo
Copy link
Contributor

Kentzo commented Jul 26, 2015

If you include #include <CoreServices/CoreServices.h> before #include <spdlog/spdlog.h> you may see the following error:

/spdlog/include/spdlog/spdlog.h:33:
[03:13:19][Step 5/7] In file included from spdlog/include/spdlog/logger.h:36:
[03:13:19][Step 5/7] In file included from spdlog/include/spdlog/sinks/base_sink.h:35:
[03:13:19][Step 5/7] In file included from spdlog/include/spdlog/sinks/./sink.h:27:
[03:13:19][Step 5/7] In file included from spdlog/include/spdlog/sinks/../details/log_msg.h:29:
[03:13:19][Step 5/7] spdlog/include/spdlog/sinks/../details/./format.h:927:38: error: expected member name or ';' after declaration specifiers
[03:13:19][Step 5/7]     static yes &check(fmt::ULongLong);
[03:13:19][Step 5/7]     ~~~~~~~~~~                       ^
[03:13:19][Step 5/7] spdlog/src/spdlog/include/spdlog/sinks/../details/./format.h:928:26: error: expected member name or ';' after declaration specifiers
[03:13:19][Step 5/7]     static no &check(...);
[03:13:19][Step 5/7]     ~~~~~~~~~            ^
[03:13:19][Step 5/7] spdlog/src/spdlog/include/spdlog/sinks/../details/./format.h:931:40: error: expected expression
[03:13:19][Step 5/7]     enum { value = (sizeof(check(get())) == sizeof(yes)) };
[03:13:19][Step 5/7]                                        ^
[03:13:19][Step 5/7] spdlog/src/spdlog/include/spdlog/sinks/../details/./format.h:966:31: error: expected unqualified-id
[03:13:19][Step 5/7] inline bool check(bool value) {
[03:13:19][Step 5/7]                               ^
[03:13:19][Step 5/7] spdlog/src/spdlog/include/spdlog/sinks/../details/./format.h:1032:47: error: expected expression
[03:13:19][Step 5/7]         if (check(sizeof(long) == sizeof(int)))
[03:13:19][Step 5/7]                                               ^
[03:13:19][Step 5/7] spdlog/src/spdlog/include/spdlog/sinks/../details/./format.h:1042:61: error: expected expression
[03:13:19][Step 5/7]         if (check(sizeof(unsigned long) == sizeof(unsigned)))
[03:13:19][Step 5/7]                                                             ^
[03:13:19][Step 5/7] spdlog/src/spdlog/include/spdlog/sinks/../details/./format.h:1130:35: warning: declaration shadows a field of 'NamedArg<Char>' [-Wshadow]
[03:13:19][Step 5/7]     NamedArg(BasicStringRef<Char> name, const T &value)
[03:13:19][Step 5/7]                                   ^
[03:13:19][Step 5/7] spdlog/src/spdlog/include/spdlog/sinks/../details/./format.h:1127:26: note: previous declaration is here
[03:13:19][Step 5/7]     BasicStringRef<Char> name;
[03:13:19][Step 5/7]                          ^
[03:13:19][Step 5/7] spdlog/src/spdlog/include/spdlog/sinks/../details/./format.h:1753:58: error: expected expression
[03:13:19][Step 5/7]     if (check(sizeof...(Args) > ArgList::MAX_PACKED_ARGS))
[03:13:19][Step 5/7]                                                          ^
[03:13:19][Step 5/7] spdlog/src/spdlog/include/spdlog/sinks/../details/./format.h:1778:59: error: expected expression
[03:13:19][Step 5/7]     if (check(sizeof...(Args) >= ArgList::MAX_PACKED_ARGS))

Tested on 10.10.4, latest xcode.

@gabime
Copy link
Owner

gabime commented Apr 17, 2016

@Kentzo whats the status of this? does it still happen?

@jeduden
Copy link

jeduden commented Jul 4, 2016

Yep, it does.

@godbyk
Copy link
Contributor

godbyk commented Jul 4, 2016

It appears to be a conflict in fmt (which spdlog uses) and not spdlog itself.

If I replace #include <spdlog/spdlog.h> with #include <spdlog/details/format.h>, I get the same errors.

@gabime
Copy link
Owner

gabime commented Jul 4, 2016

in this case i will report this issue to fmt devs

@gabime
Copy link
Owner

gabime commented Jul 15, 2016

Fixed in f5bde23

@gabime gabime closed this as completed Jul 15, 2016
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