Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #357 from hjk41/dllexport
Browse files Browse the repository at this point in the history
fix windows linkage problem with dllexport
  • Loading branch information
tqchen committed Oct 22, 2015
2 parents 69bbea3 + 92557aa commit 3e91cc9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions include/mxnet/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@
#endif
#endif

/*!
* \brief define dllexport for Visual Studio
*/
#ifdef _MSC_VER
#ifdef MXNET_EXPORTS
#define MXNET_API __declspec(dllexport)
#else
#define MXNET_API __declspec(dllimport)
#endif
#else
#define MXNET_API
#endif

/*! \brief namespace of mxnet */
namespace mxnet {
/*! \brief mxnet cpu */
Expand Down
2 changes: 1 addition & 1 deletion include/mxnet/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ enum class FnProperty {
/*!
* \brief Dependency engine that schedules operations.
*/
class Engine {
class MXNET_API Engine {
public:
/*!
* \brief OnComplete Callback to the engine,
Expand Down
2 changes: 1 addition & 1 deletion include/mxnet/storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace mxnet {
/*!
* \brief Storage manager across multiple devices.
*/
class Storage {
class MXNET_API Storage {
public:
/*!
* \brief Storage handle.
Expand Down

0 comments on commit 3e91cc9

Please sign in to comment.