Skip to content

Commit

Permalink
Merge pull request #178 from leapmotion/fix-dllimport
Browse files Browse the repository at this point in the history
Need to specify dllimport/dllexport in order to create an import lib on Windows
  • Loading branch information
gtremper committed Oct 27, 2014
2 parents 33069e1 + db46449 commit 12df801
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 11 additions & 1 deletion autowiring/AutoNetServer.h
Expand Up @@ -6,6 +6,16 @@ class AutoNetServer;

extern AutoNetServer* NewAutoNetServerImpl(void);

#ifdef _MSC_VER
#ifdef AUTOWIRING_EXPORT_AUTONET
#define AUTONET_EXPORT __declspec(dllexport)
#else
#define AUTONET_EXPORT __declspec(dllimport)
#endif
#else
#define AUTONET_EXPORT
#endif

class AutoNetServer:
public CoreThread
{
Expand All @@ -15,7 +25,7 @@ class AutoNetServer:
public:
virtual ~AutoNetServer();

static AutoNetServer* New(void) {
static AUTONET_EXPORT AutoNetServer* New(void) {
return NewAutoNetServerImpl();
}

Expand Down
3 changes: 3 additions & 0 deletions src/autonet/stdafx.h
Expand Up @@ -7,6 +7,9 @@
#define NOMINMAX
#endif

// Defined when we are exporting symbols
#define AUTOWIRING_EXPORT_AUTONET

#ifndef _MSC_VER
#include <stdlib.h>
#else
Expand Down

0 comments on commit 12df801

Please sign in to comment.