__declspec(dllexport) ClassName *c;
placed in the header getting me a lot of error messages (up to 10), such as:
- syntax error : missing ‘;’ before ‘*’
- missing type specifier – int assumed
not only in that header, but also around static functions in ClassName implementation, while doing
__declspec(dllexport) int *c;
compiles fine.
What’s going on?
You should mark it as
extern. Also, make sure the definition ofClassNameis visible.