1 #include<stdlib.h> 2 #if defined _WIN32 || defined __CYGWIN__ 3 #define DLL_PUBLIC __declspec(dllexport) 4 #else 5 #if defined __GNUC__ 6 #define DLL_PUBLIC __attribute__ ((visibility("default"))) 7 #else 8 #pragma message ("Compiler does not support symbol visibility.") 9 #define DLL_PUBLIC 10 #endif 11 #endif 12 13 14 char func_c(void); 15 func_b(void)16char DLL_PUBLIC func_b(void) { 17 if(func_c() != 'c') { 18 exit(3); 19 } 20 return 'b'; 21 } 22