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

missing EXPORT_MACRO with PduBank #50

Merged
merged 1 commit into from
Mar 13, 2021
Merged

Conversation

shadow88s
Copy link
Contributor

add EXPORT_MACRO to PduBank

add EXPORT_MACRO to PduBank
@leif81
Copy link
Member

leif81 commented Mar 12, 2021

Thank-you for contribution @shadow88s

Could you describe the change? I'm not familiar with what this change does.

@shadow88s
Copy link
Contributor Author

Thank-you for contribution @shadow88s

Could you describe the change? I'm not familiar with what this change does.

This change exports the class from the DLL. Without this export, the Linker cannot find the class symbol in the object file and I run into a lnk2019 unresolved external symbol __declspec(dllimport) error.

According to microsft documents, __"declspec(dllexport) stores function names in the DLL's export table. When building your DLL, you typically create a header file that contains the function prototypes and/or classes you are exporting and add __declspec(dllexport) to the declarations in the header file. To make your code more readable, define a macro for __declspec(dllexport) and use the macro with each symbol you are exporting:"

https://docs.microsoft.com/en-us/cpp/build/exporting-from-a-dll-using-declspec-dllexport?view=msvc-160

@leif81 leif81 merged commit a9f9f26 into open-dis:master Mar 13, 2021
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.

2 participants