extern struct not recognised in CDT

41 views Asked by At

I have following piece of code in one of my source file under a project in CDT(eclipse).

extern "C" {
void*   obj1(int size);     /* alloc uninit memory */
void*   obj2(int size);     /* alloc cleared memory */
void*   obj3(void*, int size);  /* extend memory, new mem is uninit */
void    obj4(void* ptr);
}

I am getting this error message "expected identifier or '(' before string constants"
i think that compiler could not recognise it and i need to supply it with some flag for this purpose.please propose solution for it.It also gives the same message for another piece of code
extern "C" { int NlvStrmatch(const char*, const char*, int); }

0

There are 0 answers