solution for SyExpat bulding errors

Login to reply to this topic.
Mon, 2006-06-19 14:51
Joined: 2005-08-09
Forum posts: 29
Hi,
I try to build SyExpat latest version , and i had problems on both Winscw and thumb builds,

In Winscw something like:

Code:
Link Error   : Undefined symbol: '__declspec(dllimport) _XML_ParserFree (__imp__XML_ParserFree)'

Link Error   : referenced from 'CExpatParserBase::~CExpatParserBase(void) (??1CExpatParserBase@@UAE@XZ)' in SYEXPAT.cpp:309

Link Error   : Note: symbol '_XML_ParserFree' found in 'XMLPARSE.o';

Link Error   : your project may need the DLL import library instead of a static library

... more similar lines

So i comment the next lines in expat_external.h:

Code:
// #ifdef XML_USE_MSC_EXTENSIONS
// #define XMLIMPORT __declspec(dllimport)
// #endif

And now it is compiled ok, with no errors.

Is this ok thing to do, or is there some other solution?


Regarding Thumb version errors:

Code:
Error   : static_cast from `XML_Error' to `TSyExpatError'
SYEXPAT.cpp line 381   

So i change that line, adding underline f. name:

Code:
return STATIC_CAST(TSyExpatError,[u](TSyExpatError)[/u]XML_GetErrorCode(REINTERPRET_CAST(XML_Parser,iParser)));

So i am just wondering is this solutions ok. Or i making some big mistake here. ??




Mon, 2006-06-19 16:26
Joined: 2005-08-09
Forum posts: 29
Re: solution for SyExpat bulding errors
Problems are continued when running some of the test programs that comes with SyExpat (Elements .. ).

For Winscw everithing is Ok , but for Thumb there are some link errors, just like in this post:
http://forum.newlc.com/index.php/topic,7694.0.html

Code:
Link Error   : SYEXPAT-2/SYMBIAN/EXAMPLES/Elements_Data/THUMB_UREL/ObjectCode/ELEMENTS.o)(.text+0x20):ELEMENTS.cpp: undefined reference to `CSyContextualParser::NewLC(TDesC16 const &)'
...
more similar lines

Like there no LIB file, but i am 100% sure that i have sysexpat.lib and DLL compiled for THUMB right where it supose to be. in
\epoc32\release\thumb\urel

Eny ideas? I have tryed all versions of SyExpat and  every version give same erorrs.



Mon, 2006-06-19 23:59
Joined: 2005-08-09
Forum posts: 29
Re: solution for SyExpat bulding errors
Ok, i am still replaying my self Smiley
Hope some one can give me some directions.

I fixed last link errors from my second post, by changing every IMPORT_C call with EXPORT_C. And now everithing is Ok.

So i fixed my problems, but i am still not sure that this is the right way. Huh
  • Login to reply to this topic.