SPARK icon indicating copy to clipboard operation
SPARK copied to clipboard

Fix dll linkage on mingw64

Open kingscallop opened this issue 2 years ago • 0 comments

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
      |                                    ^~~~~~~~~~~~~~~

kingscallop avatar May 07 '22 14:05 kingscallop