-
Notifications
You must be signed in to change notification settings - Fork 27
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
Make it possible to use as header only library #24
Conversation
95c2329
to
c7d777c
Compare
👀 @kkaefer |
The reason why I'm pushing this is because Secondly this will help me with the |
|
||
#if !defined(MAPBOX_GEOJSON_LIBRARY) | ||
#include "geojson_impl.hpp" | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should not do this in a header file, but rather in a separate *.cpp
file to avoid issues with having geojson.hpp
included more than once, which leads to duplicate definitions. So instead of including the implementation here, we should do it in src/mapbox/geojson.cpp
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also means that we don't need the define flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @kkaefer, this makes a lot more sense.
c7d777c
to
a272ae7
Compare
a272ae7
to
c20e2b9
Compare
New patch for review, I tested this all the way to |
It is still possible to use it as a static library.