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

fix windows linkage problem with dllexport #357

Merged
merged 6 commits into from
Oct 22, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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