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

Fix dll linkage on mingw64 #17

Open
wants to merge 1 commit into
base: spark2
Choose a base branch
from

Conversation

kingscallop
Copy link
Contributor

On mingw64, functions that have a dllimport attribute and are inline functions,
need to have the inline specifier on both the definition and declaration when
they are present in the same header file.
Otherwise the following warning appears:

spark/include/Extensions/Modifiers/SPK_EmitterAttacher.h:132:36: warning: 'const SPK::Ref<SPK::Emitter>& SPK::EmitterAttacher::getEmitter() const' redeclared without dllimport attribute after being referenced with dll linkage
  132 |         inline const Ref<Emitter>& EmitterAttacher::getEmitter() const
      |                                    ^~~~~~~~~~~~~~~

On mingw64, functions that have a dllimport attribute and are inline functions,
need to have the inline specifier on both the definition and declaration when
they are present in the same header file.
Otherwise the following warning appears:

spark/include/Extensions/Modifiers/SPK_EmitterAttacher.h:132:36: warning: 'const SPK::Ref<SPK::Emitter>& SPK::EmitterAttacher::getEmitter() const' redeclared without dllimport attribute after being referenced with dll linkage
  132 |         inline const Ref<Emitter>& EmitterAttacher::getEmitter() const
      |                                    ^~~~~~~~~~~~~~~
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