-
Notifications
You must be signed in to change notification settings - Fork 517
Build changes for shared libs on Windows #372
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
Conversation
|
||
## Building shared libraries | ||
|
||
You can build H3 as a shared library (DLL), but the test suite does not support this configuration because the tests use functions internal to the DLL, and they are not exposed for testing. |
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 you can drop everything after the comma.
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.
The last comma, I mean.
@@ -29,10 +29,19 @@ | |||
#ifdef H3_ALLOC_PREFIX | |||
#define H3_MEMORY(name) TJOIN(H3_ALLOC_PREFIX, name) | |||
|
|||
#ifdef __cplusplus | |||
extern "C" { |
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.
When is Microsoft going to give up this stupid fight and compile normal C?
@@ -152,46 +163,47 @@ typedef struct { | |||
*/ | |||
/** @brief find the H3 index of the resolution res cell containing the lat/lng | |||
*/ | |||
H3Index H3_EXPORT(geoToH3)(const GeoCoord *g, int res); | |||
DECLSPEC H3Index H3_EXPORT(geoToH3)(const GeoCoord *g, int res); |
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.
Not going to block on this, but I wonder if it would have been possible to modify the H3_EXPORT
instead to tackle this, eg: H3_EXPORT(H3Index, geoToH3)(const GeoCoord *g, int res);
and macro args may or may not include the DECLSPEC thing.
#366
This PR is still a draft. It changes how DLLs are built on Windows.
TODO: