XmlLite says: error C2146: syntax error : missing ';' before identifier 'IXmlReader'
This is something that I've been asked more than once, and so here goes an answer that might help if you run into this.
Let's say that you create a new project and borrow code or do something of the sort, and suddenly start getting an error message such as this one
xmllite.h(49) : error C2146: syntax error : missing ';' before identifier 'IXmlReader'
This typically points to a missing macro. You can fix this by adding this to your include headers:
#include "objbase.h"
If you're using Visual C++-style projects, this may already be included via stdafx.h including the Windows headers for you.
Comments
- Anonymous
June 11, 2009
The comment has been removed - Anonymous
June 13, 2009
uabix, can you share the error message that you get, and the headers that are in the .c and stdafx.h files?