Skip to content

Fix dll linkage on mingw64#17

Open
kingscallop wants to merge 1 commit intoSynxis:spark2from
kingscallop:mingw64-dll-linkage-fix
Open

Fix dll linkage on mingw64#17
kingscallop wants to merge 1 commit intoSynxis:spark2from
kingscallop:mingw64-dll-linkage-fix

Conversation

@kingscallop
Copy link
Copy Markdown
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