Re: how to use COM component?
- From: Friedrich Dominicus <just-for-news-frido@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 04 Feb 2006 16:13:39 +0100
"kren" <kren999@xxxxxxx> writes:
when i compile the fileYou have not linked against the proper libraries
#include <stdio.h>
#include "msxml.h"
int main(void) {
HRESULT hr;
IXMLDOMDocument *doc = NULL;
CoInitialize(NULL);
hr = CoCreateInstance(&CLSID_DOMDocument,
NULL, CLSCTX_INPROC,
&IID_IXMLDOMDocument,
(void **)&doc);
if (SUCCEEDED(hr)) {
doc->Release();
}
else
printf("Error creating MSXML instance. 0x%x\n", hr);
CoUninitialize();
return 0;
}
Wedit output
Error e:\computer\mylib\xml\xml.c 15 undefined reference to
_IID__Recordset
Error e:\computer\mylib\xml\xml.c 15 undefined reference to
_CLSID_Recordset
is why??
you have to add
ole32.lib oleaut32.lib
to the Projects->Configuration->Linker
Additonal files to be included in the link
Regards
Friedrich
--
Please remove just-for-news- to reply via e-mail.
.
- References:
- how to use COM component?
- From: kren
- how to use COM component?
- Prev by Date: how to use COM component?
- Next by Date: Re: how to use COM component?
- Previous by thread: how to use COM component?
- Next by thread: Re: how to use COM component?
- Index(es):