Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@robUx4
Copy link
Contributor

@robUx4 robUx4 commented Mar 18, 2025

The method may be inlined in parent classes, in external code. That results in needing to export the private PredefinedCommands destructor so it can be called by the external code, even if it's not supposed to know about it.

Moving the destructor to the C++ file ensures the default destructor call is not inline and thus accessing the private PredefinedCommands destructor which is not DLL exported.

The method may be inlined in parent classes, in external code. That results in needing to export the private PredefinedCommands destructor so it can be called by the external code, even if it's not supposed to know about it.
@lelegard
Copy link
Member

I have implemented a slightly different solution. Instead of implementing an explicit non-inline destructor, I added a TSCOREDLL attribute on the private inner class which is implicitly referenced in the destructor. This preserves the benefit of inlining while (hopefully) fixing the export issue.

Please check if it works for you with clang on Windows. If it does, please close this PR.

@robUx4
Copy link
Contributor Author

robUx4 commented Mar 19, 2025

Yes it seems to be working fine.

@robUx4 robUx4 closed this Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants