I’m trying to make a program run with the eclipse IDE but I get the above mentioned error.
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
tCRU_BUF_CHAIN_HEADER *CRU_BUF_Allocate_MsgBufChain ARG_LIST((UINT4 u4Size,UINT4 u4ValidOffsetValue));
[some more macros where this error comes]
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
is one of the errors, there comes the error:
“expected initialiser before ‘ARG_LIST'”
To be accurate, there are 18 macros of the same type that give this error, in the moment i delete the “ARG_LIST” the error goes away, but because this isn’t code that I created I don’t want to delete this part.
I tried to find a solution in the net but couldn’t find something and now I’m hoping someone here can help me.
If you need some more information I try to answer it as fast as possible.
I think you can safely delete the ARG_LIST part. Macros like ARG_LIST were used in old (1970s) versions of C++ where functions/methods didn’t specify the parameters they took. For example, you declared a function like this:
And you could call it with any number of arguments.
Then, when full function signatures were added to the language, programmers defined macros to take advantage of type checking in compilers that supported it, but still make the code compatible with compilers that didn’t support it:
Nowadays all compilers support full signatures, so there’s no point to use such macros.