Commit 64f40a28 authored by David Cole's avatar David Cole
Browse files

BUG: Fix test that broke on Windows - sharing sources between SHARED and...

BUG: Fix test that broke on Windows - sharing sources between SHARED and STATIC libraries requires correct export and import decorations in the source code...
parent d58b93a5
#ifdef _WIN32 void foo();
# define CM_TEST_LIB_IMPORT __declspec( dllimport )
#else
# define CM_TEST_LIB_IMPORT
#endif
CM_TEST_LIB_IMPORT void foo();
int main() int main()
{ {
foo(); foo();
......
#include <stdio.h> #include <stdio.h>
#ifdef _WIN32 #if defined(_WIN32) && defined(foo_EXPORTS)
# define CM_TEST_LIB_EXPORT __declspec( dllexport ) # define CM_TEST_LIB_EXPORT __declspec( dllexport )
#else #else
# define CM_TEST_LIB_EXPORT # define CM_TEST_LIB_EXPORT
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment