Skip to content

Always set __declspec(dllexport) for classes#203

Merged
bugdea1er merged 2 commits into
mainfrom
abi
Apr 27, 2025
Merged

Always set __declspec(dllexport) for classes#203
bugdea1er merged 2 commits into
mainfrom
abi

Conversation

@bugdea1er
Copy link
Copy Markdown
Owner

Apparently you can always specify dllexport for library classes on Windows, so this pull request eliminates the need to add the TMP_BUILDING_DLL compilation definition

@bugdea1er bugdea1er requested a review from Copilot April 27, 2025 20:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR simplifies the ABI definition for Windows by always exporting library classes with __declspec(dllexport), removing the conditional TMP_BUILDING_DLL logic.

  • Removes the TMP_BUILDING_DLL condition for Windows builds
  • Unconditionally defines abi as __declspec(dllexport) on Windows
  • Retains the default visibility attribute for non-Windows platforms
Files not reviewed (2)
  • meson.build: Language not supported
  • src/CMakeLists.txt: Language not supported
Comments suppressed due to low confidence (1)

src/abi.hpp:4

  • Removing the TMP_BUILDING_DLL check results in using __declspec(dllexport) unconditionally on Windows. Please verify that this change does not lead to linking issues when importing the library.
#if defined TMP_BUILDING_DLL

@bugdea1er bugdea1er marked this pull request as ready for review April 27, 2025 20:48
@bugdea1er bugdea1er merged commit 67d8cf2 into main Apr 27, 2025
16 checks passed
@bugdea1er bugdea1er deleted the abi branch April 27, 2025 20:48
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