diff --git a/example/library.c b/example/library.c index 808a2a4..cd5f0dd 100644 --- a/example/library.c +++ b/example/library.c @@ -3,7 +3,7 @@ #include -#if defined(__GNUC__) +#if defined(__GNUC__) && !defined(_WIN32) __attribute__((constructor)) #endif static void load() @@ -42,7 +42,8 @@ static void load() } } -#if defined(__GNUC__) +#if defined(__GNUC__) && !defined(_WIN32) +__attribute__((constructor)) __attribute__((destructor)) #endif static void unload()