28 Oct
2005
28 Oct
'05
2:43 p.m.
Hi Folks! In a C wrapper file, I have the declaration /* xmlc.c */ const char* _c_CXML_DEFAULT_VERSION = XML_DEFAULT_VERSION; Now, I would like to use it in pascal. { xml.pas, Unit } unit XML; interface var C_HELPER_XML_DEFAULT_VERSION: CString; external name '_c_CXML_DEFAULT_VERSION'; attribute (const); XML_DEFAULT_VERSION: TString = CString2String (C_HELPER_XML_DEFAULT_VERSION); implementation {$L xmlc.c} end. Using this unit results in an error: "cannot evaluate this expression from a global declaration" "Error initial value is of wrong type". How can I use my string constant in GPC? Eike