Skip to content

MSVC symbol decorators #19

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

joelpmichael
Copy link
Contributor

commit c010d02 adds the equivalent __attribute__((noreturn)) function decorator in MSVC.

commit a4367b1 is more involved, adding MSVC function decorators to support importing and exporting symbols. By default in shared libraries when built using MSVC, no symbols are exported, and symbols must be explicitly marked __declspec(dllexport). Additionally, global variables must be explicitly imported using __declspec(dllimport) placed immediately after an extern before the variable type (functions are implicitly imported). This is required to link logtools built using MSVC on Windows as a shared object (DLL). Should not affect building using GCC/CLANG as it's #ifdef-gated behind _MSC_VER. Would like someone to review this one if possible?

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

Successfully merging this pull request may close these issues.

1 participant