Switching between DLL and static library

I am trying to switch my #defines between dllexport, dllimport and a static library. The problem is that I am getting error since I don't need to define anything with my static library setup. Is there a way to get around in defining an empty #define macro?

1
2
3
4
5
6
7
8
9
10
11
#if defined DLL_EXPORT
#define DEFCALL __declspec(dllexport)
#else
#define DEFCALL __declspec(dllimport)
#endif

#if defined STATIC_LIB
  ?????
#endif

DEFCALL void foo();

Last edited on
1
2
3
#if defined STATIC_LIB
  #define DEFCALL // Defines an empty macro
#endif 
Last edited on
Thanks, this worked!
You're welcome :)
Topic archived. No new replies allowed.