On Jul 14, 2009, at 11:40 AM, Benjamin Schindler wrote:

#if defined(_MSC_VER) && (_MSC_VER >= 1300)
#ifdef FLOW_DLL_EXPORT
#define FLOW_DLL _declspec(dllexport)
#else
#define FLOW_DLL _declspec(dllimport)
#endif
#else
#ifdef __GNUC__
#define FLOW_DLL
#endif
#endif



Not sure how dangerous this is _but_ when I have the same type of code for my windows code I don't explicitly define the __GNUC__ case because AFAIK MSVC is the only compiler that _I_ am using that needs this type of decoration. If this happens to be your case also then simply have the following:


#if defined(_MSC_VER) && (_MSC_VER >= 1300)
#ifdef FLOW_DLL_EXPORT
#define FLOW_DLL _declspec(dllexport)
#else
#define FLOW_DLL _declspec(dllimport)
#endif
#else
#define FLOW_DLL
#endif

If there are specific compilers that NEED to have FLOW_DLL defined to something that mimics MSVC (Like newer versions of GCC if you want to) then I would add specific #if defined (SOME_COMPILER) for that compiler. Any of that make sense?

---
Mike Jackson                 www.bluequartz.net



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to