libstuff.c 421 B

12345678910111213141516171819
  1. #if defined _WIN32 || defined __CYGWIN__
  2. #define DLL_PUBLIC __declspec(dllexport)
  3. #else
  4. #if defined __GNUC__
  5. #define DLL_PUBLIC __attribute__ ((visibility("default")))
  6. #else
  7. #pragma message ("Compiler does not support symbol visibility.")
  8. #define DLL_PUBLIC
  9. #endif
  10. #endif
  11. #include <stdio.h>
  12. int DLL_PUBLIC printLibraryString(const char *str)
  13. {
  14. printf("C library says: %s", str);
  15. return 3;
  16. }