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

Windows DLL support #24

Closed
marcstern opened this issue Sep 13, 2024 · 2 comments
Closed

Windows DLL support #24

marcstern opened this issue Sep 13, 2024 · 2 comments

Comments

@marcstern
Copy link

Current code is incompatible with Windows DLL.
Solution is simple. In .H files:

#ifdef WIN32
# ifdef CJOSE_BUILD
#  define CJOSE_EXTERN __declspec(dllexport)
# else
#  define CJOSE_EXTERN __declspec(dllimport)
# endif
#else
# define CJOSE_EXTERN
#endif
[...]
CJOSE_EXTERN const char *CJOSE_HDR_ALG;

Example is for CJOSE_HDR_ALG, but should be added to all exported symbols.
The #ifdef WIN32 has to be included once in a central file obviously.

Could we expect this?
Thanks a lot

@zandbelt
Copy link
Member

zandbelt commented Nov 8, 2024

since the Windows build requires other Windows-specific files as well I suggest to keep this in a fork

@zandbelt zandbelt closed this as completed Nov 8, 2024
@marcstern
Copy link
Author

I build it in Windows with only that addition

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

No branches or pull requests

2 participants