After creating a spine.lib and linking my engine to it, it seems to have trouble finding the RTTI_DECL macro
error LNK2001: unresolved external symbol "public: static class spine::RTTI const spine::MeshAttachment::rtti" (?rtti@MeshAttachment@spine@@2VRTTI@2@B)
In order to create the lib file I modified this line in dll.h:
#define SP_API __declspec(dllexport)
Did I miss something when doing this, has anybody seen this issue before?
1. sayfa (Toplam 1 sayfa)
scott__
1 year ago
- scott__
- Mesajlar: 2
Mario
How are you compiling the .lib file with VC++?
1 year ago
-
Mario - Mesajlar: 3274
scott__
Yes, and the link libraries are defined with cmake
---
My problem was #define SP_API __declspec(dllexport) defines SP_API only as an export, so when my engine imports the DLL, it's actually exporting it instead. To fix this I needed to define SP_API as:
# ifdef spine_EXPORTS
# define SP_API DLLEXPORT
# else
# define SP_API DLLIMPORT
# endif
This way it will export the functions when compiled, but import when my library imports them.
---
My problem was #define SP_API __declspec(dllexport) defines SP_API only as an export, so when my engine imports the DLL, it's actually exporting it instead. To fix this I needed to define SP_API as:
# ifdef spine_EXPORTS
# define SP_API DLLEXPORT
# else
# define SP_API DLLIMPORT
# endif
This way it will export the functions when compiled, but import when my library imports them.
1 year ago
- scott__
- Mesajlar: 2
Mark topic unread
• 1. sayfa (Toplam 1 sayfa)
Dön Runtimes
- Tüm zamanlar UTC