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

Fix MSVC dll import/export #229

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

airbrett
Copy link

@airbrett airbrett commented Oct 1, 2022

Problem: When building a dll on Windows with MSVC some symbols are not exported while others are exported with C++ name mangling rather than C.

Solution: Add CP_EXPORT to functions not exported. Add define block to handle __declspec(dllexport) and __declspec(dllimport). Note: this solution requires a new define added to instruct the compiler to look for a shared library or a static library. This only applies when _WIN32 is defined.

This may fix #194, #116 and possibly #121

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

Successfully merging this pull request may close these issues.

MSVC+CMake: unresolved external symbol cpHastySpaceNew
1 participant