Skip to content

Fix MSVC dll import/export - #229

Open
airbrett wants to merge 4 commits into
slembcke:masterfrom
airbrett:master
Open

Fix MSVC dll import/export#229
airbrett wants to merge 4 commits into
slembcke:masterfrom
airbrett:master

Conversation

@airbrett

@airbrett airbrett commented Oct 1, 2022

Copy link
Copy Markdown

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