On Mon, Jul 13, 2009 at 10:31 AM, Benjamin Schindler wrote:
> Hi
>
> I'm working on a project which builds both on linux and windows. I generated
> an eclipse project out of it which works basically fine but it's not able to
> recognize i.e. the __GNUC__ macro (and probably any other macro defined per
> default on gcc) are not recognized by eclipse. That means that by using a
> header like:
>
> #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
>
> and then declaring a class like:
>
> class FLOW_DLL something { .... };
> will fool eclipse's parser. When I remove the #ifdef __GNUC__, it works. Is
> this an issue in the eclipse generator or in the eclipse parser?

The eclipse generator is an external generator... meaning that it uses
unix makefiles to compile in in linux with gcc. So, the project should
build properly, does it? If you go to the build directory and type
'make', does it build correctly?

The problem would still be present for the eclipse parser to support
the IDE browsing features. For example, it wil gray out the area when
it should not do so, etc. Is this what you mean by will fool the
parser?

--Miguel
_______________________________________________
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