Skip to content

Commit

Permalink
Fix export of registration function when using MinGW
Browse files Browse the repository at this point in the history
  • Loading branch information
speth authored and ischoegl committed Feb 3, 2023
1 parent 6910c8d commit 36ccb1b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 0 additions & 5 deletions include/cantera/extensions/PythonExtensionManager.h
Expand Up @@ -8,9 +8,6 @@

#include "cantera/base/ExtensionManager.h"

#define BOOST_DLL_USE_STD_FS
#include <boost/dll/alias.hpp>

namespace Cantera
{

Expand Down Expand Up @@ -44,8 +41,6 @@ class PythonExtensionManager : public ExtensionManager
static bool s_imported;
};

BOOST_DLL_ALIAS(Cantera::PythonExtensionManager::registerSelf, registerPythonExtensionManager);

}

#endif
10 changes: 10 additions & 0 deletions src/extensions/PythonExtensionManager.cpp
Expand Up @@ -20,6 +20,16 @@
#include <windows.h>
#endif

#define BOOST_DLL_USE_STD_FS
#ifdef __MINGW32__
#define BOOST_DLL_FORCE_ALIAS_INSTANTIATION
#endif
#include <boost/dll/alias.hpp>

// This creates and exports the name that is imported from Application::loadExtension
BOOST_DLL_ALIAS(Cantera::PythonExtensionManager::registerSelf,
registerPythonExtensionManager);

namespace ba = boost::algorithm;
using namespace std;

Expand Down

0 comments on commit 36ccb1b

Please sign in to comment.