Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Problem : EXTERN keyword in ri.h

Help
2007-03-27
2013-04-25
  • Nicholas Yue
    Nicholas Yue
    2007-03-27

    Hi

      While including the file ri.h, I have found that the "EXTERN" symbol is clashing with Ruby's header file (on OSX anyway).

      Looking at some other header files, I see that some uses DLLIMPORT/DLLEXPORT instead, even then, the put a check in to ensure that it is not already defined e.g.

              #ifndef DLLIMPORT
              #if defined(_WIN32) || defined(_WINDOWS)
              #ifdef DLL
              #define DLLIMPORT __declspec(dllimport)
              #else
              #define DLLIMPORT
              #endif /* DLL */
              #else
              #define DLLIMPORT
              #endif
              #endif

      For your consideration.

    Regards