Compiling Expat XML parser under Series 60...
| Mon, 2003-10-27 12:11 | |
|
Hi, Has anyone sucessfully compiled the Expat XML parser under Series 60? I have been trying to do sao and am getting a load of errors.. at first some unresolved external symbols.. and now tons of undefined refrences & relocation trunculated... ending with Error 1. What are the steps involed (other than creating the bld & mmp files) to compile the above under Symbian.. should one compile XmlParse, XmlToken, XmlWf seperately and/or in any particular order? Xmlparse seems to compile straight away under MS Windows using the DSP files supplied with Expat. Any clues??? Ta, Ash Ash |
|






Forum posts: 363
This would be a good topic for a tutorial because many people ask about compiling Expat for Symbian.
I am looking into this in the near future - if you manage to come up with a description of your problems and solutions before that, please post them here
Cheers,
Pawel
Forum posts: 7
Cheers!
Ash
Ash
Forum posts: 2009
BTW, did you check Simkin scripting language. I think that Simon has posted somewhere on the site that it includes Expat.
Cheers,
Eric
Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant
Ash
Forum posts: 7
XMLPARSE.obj : error LNK2001: unresolved external symbol _XmlGetUtf8InternalEncoding
XMLPARSE.obj : error LNK2001: unresolved external symbol _XmlInitEncoding
XMLPARSE.obj : error LNK2001: unresolved external symbol _XmlPrologStateInit
XMLPARSE.obj : error LNK2001: unresolved external symbol _XmlUtf8Encode
XMLPARSE.obj : error LNK2001: unresolved external symbol _XmlParseXmlDecl
XMLPARSE.obj : error LNK2001: unresolved external symbol _XmlInitUnknownEncoding
XMLPARSE.obj : error LNK2001: unresolved external symbol _XmlSizeOfUnknownEncoding
EDLL.LIB(UP_DLL.obj) : error LNK2001: unresolved external symbol "int __cdecl E32Dll(enum TDllReason)" (?E32Dll@@YAHW4TDllReason@@@Z)
\Symbian\6.1\Series60\EPOC32\BUILD\XML\EXPAT\XMLPARSE\XMLPARSE\WINS\UDEB\XMLPARSE.DLL : fatal error LNK1120: 8 unresolved externals
NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
Stop.
Ash
Forum posts: 363
I managed to almost compile it with the following files:
XMLPARSE.MMP:
TARGETTYPE dll
UID 0x1000008d 0x100aeeef
MACRO XML_MIN_SIZE
SOURCEPATH .\xmlparse
SOURCE xmlparse.c
SOURCEPATH .
SOURCE dllm.cpp
SOURCEPATH .\xmltok
SOURCE xmlrole.c
SOURCE xmltok.c
USERINCLUDE .\xmlparse
USERINCLUDE .\xmltok
SYSTEMINCLUDE ..\..\..\..\..\..\symbian\series60_cw\epoc32\include\libc
SYSTEMINCLUDE \Epoc32\include
LIBRARY euser.lib estlib.lib
#if defined(WINS)
deffile .\xmlparseWINS.def
#else if defined(ARM)
deffile .\xmlparseARM.def
#endif
nostrictdef
DLLM.CPP:
#include <e32def.h>
#include <e32uid.h>
// The E32Dll() entry point function
GLDEF_C TInt E32Dll(TDllReason /*aReason*/)
{
return(KErrNone);
}
The only problem is with the global variables so this does not directly compile into a DLL. But then this is a standard problem which is discussed elsewhere..
Cheers,
Pawel
Forum posts: 363
Cheers,
Pawel
Forum posts: 6
- first, i used pawel's .mmp and .cpp files
- i placed all the necessary files in one folder, mostly files from expat/lib. so no group, src, etc folders
- change #include <expat_config.h> to #include "expat_config.h" on some .c files
- do a 'abld build freeze'
- then compile, no errors
now my question is, how to use the DLL
#include .sig
CIAO
Forum posts: 2009
TARGETTYPE dll
UID 0x1000008D 0x101FAE0C
MACRO __SYMBIAN32__
SOURCEPATH ..\lib
SOURCE ..\lib\xmlparse.c
SOURCE ..\lib\xmlrole.c
SOURCE ..\lib\xmltok.c
SOURCE ..\symbian\expatdll.cpp
USERINCLUDE .
USERINCLUDE ..\lib
SYSTEMINCLUDE \epoc32\include
SYSTEMINCLUDE ..\lib
SYSTEMINCLUDE .
SYSTEMINCLUDE \epoc32\include\libc
LIBRARY estlib.lib euser.lib edll.lib
#if defined(WINS)
deffile .\Expat_wins.def
#else
#if defined(ARM)
deffile .\Expat_armi.def
#endif
#endif
nostrictdef
Just replace the content of the MMP files found in the zip by this content.
The expaf.dll / lib files can then be created for WINS / ARMI / THUMB target from command line. Compilation will fail from VC6.
Eric
Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant
I am using S60 v1.2.
Any ideas what could be causing this ?
thanks
did the expat port, and used the dll within another porgram to parse an xml file, ad it works fine under the emulator, but doesn't compile for the ARMI build as the parser uses static variables...
anyone got to get it working/usable under the ARMI build???
Ta,
Ash
Forum posts: 2009
No thoroughly tested on mobile so far so I cannot guarantee there is no problem however
Eric
Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant