This repository was archived by the owner on Apr 4, 2025. It is now read-only.
Fix Windows dll symbol export for Unity use #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
why?
When loading the assignment plugin DLL in Unity on Windows, i encountered an
EntryPointNotFoundExceptionerror:how fixed?
This occurred because C++ functions are name-mangled by default on Windows (thanks bill)
So this pr implements a separate windows dll export mechanism using a def file
The alternative approach of using
__declspec(dllexport)with thewindows_export_all_symbolsfeature I tried but resulted in a "library limit of 65535 objects exceeded" error due to the large number of dependencies.what all change?
Fixed an incorrect path in the main BUILD.bazel file:
//sassignment:assignment_pluginto//assignment:assignment_pluginCreated a module definition (DEF) file for Windows:
assignment.defthat explicitly lists the exported function namesUpdated the Bazel build configuration:
win_def_fileandadditional_linker_inputsparameters to the cc_shared_library rule