well the problem is:
i am trying to do some xml processing on the PDA. i plan to do it in C++
using msxml and then provide a Python wrapper around it.
the code below just loads up a simple XML file and parses it.
#include <Python.h>
#include <windows.h>
#include <msxml.h>
#include <atlbase.h>
#include <afx.h>
#include <afxdisp.h>
void LoadXML(CString sFilePath)
{
CComPtr<IXMLDOMDocument> pXMLDoc;
pXMLDoc.CoCreateInstance(__uuidof(DOMDocument));
COleVariant vXmlFile(sFilePath);
VARIANT_BOOL vSuccess;
HRESULT hr = pXMLDoc.CoCreateInstance(__uuidof (DOMDocument));
pXMLDoc->put_validateOnParse(VARIANT_FALSE);
pXMLDoc->put_resolveExternals(VARIANT_FALSE);
pXMLDoc->put_preserveWhiteSpace(VARIANT_FALSE);
hr = pXMLDoc->load(vXmlFile,&vSuccess);
}
this works perfectly fine until i include the Python.h header at which
moment i get a whole list of errors. the errors are raised in atlbase.h
and are all the same
C:\Windows CE Tools\wce300\Pocket PC 2002\atl\include\atlbase.h(5395) :
error C2664: '__WinCE_OutputDebugStringA' : cannot convert parameter 1
from 'const unsigned short *' to 'const char *'
Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast
C:\Windows CE Tools\wce300\Pocket PC 2002\atl\include\atlbase.h(5396) :
error C2664: '__WinCE_OutputDebugStringA' : cannot convert parameter 1
from 'unsigned short [4]' to 'const char *'
Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast
i think there is something that needs to be changed in Python.h for this to
work but have no idea what it is.
cheers
Quoting "\"Martin v. Löwis\"" <ma****@v.loewis.de>:
Ajay wrote: i think that might be it. what would i need to change in Python.h to
remove the errors?
I don't know. We would need to understand the problem in detail first.
Martin
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.