Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Syntax error in class defination(CDT tell "Syntax error", to "class MY_EXPORT CMyClass", when "# define MY_EXPORT".)
Syntax error in class defination [message #894710] Tue, 10 July 2012 08:52
hs c is currently offline hs cFriend
Messages: 1
Registered: July 2012
Junior Member
#ifdef WIN32 // windows platform
# ifdef MY_DLL
# define MY_EXPORT __declspec(dllexport)
# else
# define MY_EXPORT __declspec(dllimport)
# endif
#else // other platform
# define MY_EXPORT
#endif // WIN32

class MY_EXPORT CMyClass
{
};

I build this CPP code by GNU C++ in linux, it's right. But CDT tell me "Syntax error".

"MY_EXPORT" is defined to null, but CDT can't recognize!

Can anyone of you tell me a way to solve this problem?

thx a lot!

[Updated on: Wed, 11 July 2012 03:13]

Report message to a moderator

Previous Topic:Can I develop a standalone application for Windows in Eclipse?
Next Topic:How do I run a main within eclipse?
Goto Forum:
  


Current Time: Wed Sep 25 10:48:18 GMT 2024

Powered by FUDForum. Page generated in 0.03104 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top