error C2065: 'IXMLDOMDocument3' : undeclared identifier
-
:confused:I am trying to write a simple program that loads an xml file but i can not link this program, I am following this tutorial http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/htm/dom\_hdi\_30dv.asp Could any body help?
#include #include #include #pragma comment(lib,"msxml2.lib")
int main()
{
HRESULT hr;
IXMLDOMDocument3 *pXMLDoc = NULL;
IXMLDOMParseError * pObjError = NULL;
BSTR bstr = NULL;
VARIANT_BOOL status;
VARIANT var;CoInitialize(NULL); hr = CoCreateInstance(CLSID\_DOMDocument40, NULL, CLSCTX\_INPROC\_SERVER, IID\_IXMLDOMDocument3, (void\*\*)&pXMLDoc); return 0;
}
-
:confused:I am trying to write a simple program that loads an xml file but i can not link this program, I am following this tutorial http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/htm/dom\_hdi\_30dv.asp Could any body help?
#include #include #include #pragma comment(lib,"msxml2.lib")
int main()
{
HRESULT hr;
IXMLDOMDocument3 *pXMLDoc = NULL;
IXMLDOMParseError * pObjError = NULL;
BSTR bstr = NULL;
VARIANT_BOOL status;
VARIANT var;CoInitialize(NULL); hr = CoCreateInstance(CLSID\_DOMDocument40, NULL, CLSCTX\_INPROC\_SERVER, IID\_IXMLDOMDocument3, (void\*\*)&pXMLDoc); return 0;
}
Did you install the MSXML 4 SDK ? (see MS platform SDK site for the update). Once installed, you still need to add the path to the msxml2.lib file in either your project settings (additional library path), or your VisualStudio general directories (tools / options / directories).