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

build: cmake: export all symbols on Windows #262

Merged
merged 1 commit into from
Apr 29, 2021

Conversation

fcelda
Copy link
Contributor

@fcelda fcelda commented Apr 29, 2021

When build libmaxminddb as a dynamic library on Windows, the .lib file is not created as the symbols in the library are not annotated with __declspec(dllimport). This can be workaround with WINDOWS_EXPORT_ALL_SYMBOLS CMake property.

Easiest workaround is to configure with cmake -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON.

This patch enables the above property on the maxminddb target only which seems to be a cleaner solution.

@fcelda fcelda marked this pull request as ready for review April 29, 2021 12:19
Copy link
Member

@oschwald oschwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@oschwald oschwald merged commit cc2d3ca into maxmind:main Apr 29, 2021
@fcelda fcelda deleted the windows-export-symbols branch April 29, 2021 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants