I’m writing an OpenGL-API in “c” and got a big problem. I get 100 error messages following a missing “)”. The funny thing about this is: when i rename the same file in .cpp it works fine.
I can only guess and tried all ideas that I had, but now I give up.
Can anybody give me any direction where the problem could be from. I can’t find a starting point.
bool is a primitive type that doesn’t exist in C, but does in C++ so that could be the problem. I would have expected that you got an error saying something to that effect, but you only posted one of the error messages so maybe you did but just didn’t recognize it for what it was…
I’m guessing your IDE assumes C compilation with a .c suffix, and C++ compilation with .cpp suffix. There is no “bool” keyword in C, which is why the C compilation is failing (or at least one reason).
Also, I think the “extern” specification on function prototypes is superfluous. I don’t think it hurts anything, but I don’t think you need it.
[This message has been edited by starman (edited 07-18-2003).]
That really helped me, I have been searching and trying for 2 days now.
I knew it had to be a simple problem. The problem was, that the error message got to another position in the source, so I did not realize it was because of the bool-type.