Choose the calling convention by platform in the public headers
JOC_CALL and EJOC_CALL were __cdecl in the JOC_STATIC / EJOC_STATIC branch on every platform. The static archive defines that branch on Linux as well, where GCC does not know __cdecl, so every declaration in eac3joc_core.h failed to compile and the Ubuntu build stopped. clang accepted the spelling off Windows, which is why only the Linux job failed. The calling convention now follows _WIN32, and the API decoration keeps its own static / import-export / visibility branch. Windows output and ctest are unchanged.
This commit is contained in:
1 parent
0bb82e4115
commit
3f0d5e87fe
2 files changed
+12
-6
No files matched your search
+6
-3
@@ -44,19 +44,22 @@
|
||||
#define JOC_EVENT_VERSION 1u
|
||||
|
||||
/* JOC_STATIC: this branch exists for building the sources directly into an application, where nothing is imported or exported. */
|
||||
#if defined(_WIN32)
|
||||
#define JOC_CALL __cdecl
|
||||
#else
|
||||
#define JOC_CALL
|
||||
#endif
|
||||
|
||||
#if defined(JOC_STATIC)
|
||||
#define JOC_API
|
||||
#define JOC_CALL __cdecl
|
||||
#elif defined(_WIN32)
|
||||
#if defined(JOC_BUILD_DLL)
|
||||
#define JOC_API __declspec(dllexport)
|
||||
#else
|
||||
#define JOC_API __declspec(dllimport)
|
||||
#endif
|
||||
#define JOC_CALL __cdecl
|
||||
#else
|
||||
#define JOC_API __attribute__((visibility("default")))
|
||||
#define JOC_CALL
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in new issue
Block a user