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

[ue4] Can't subclass components, linker complains #962

Closed
badlogic opened this issue Aug 3, 2017 · 4 comments
Closed

[ue4] Can't subclass components, linker complains #962

badlogic opened this issue Aug 3, 2017 · 4 comments
Assignees

Comments

@badlogic
Copy link
Collaborator

badlogic commented Aug 3, 2017

http://esotericsoftware.com/forum/UE4-unresolved-external-symbol-spFloatArray-dispose-9106

@badlogic badlogic self-assigned this Aug 3, 2017
@badlogic badlogic added in progress and removed bug labels Aug 28, 2017
@badlogic
Copy link
Collaborator Author

badlogic commented Aug 29, 2017

This appears to be impossible. UBT won't generate exported symbols for C functions either using the MODULE_API macro, or explicitly using __declspec on MSVC. The resulting .lib file never includes the exported C function symbols.

@badlogic
Copy link
Collaborator Author

badlogic commented Aug 29, 2017

Seems to work with explicit __declspec, needed to clean intermediates after code change. Doesn't work using MODULE_API macro.

@badlogic
Copy link
Collaborator Author

Introduced dll.h in spine-c, defines SP_API. Every spine-c function needs to be prefixed with this macro in its header file. For UE4 the SPINEPLUGIN_API is evaluated and eventually replaced with the correct __declspec`. For users wanting to compile Spine into a dll on Windows, users can simply set `SPINEPLUGIN_API` to `DLLEXPORT` for dll compilation and DLLIMPORT` for linking to the dll from user code.

@badlogic
Copy link
Collaborator Author

Closed via 91d44b2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant