b.c 420 B

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