"Mark Riehl" <[EMAIL PROTECTED]> writes:

> Jason - I've taken parts of Ilya's Makefile.PL and added some pieces
> of the Makefile.PL that I was working on.  The handler *.cpp files
> compile w/o a problem, but I get a few errors trying to compile
> Xerces.c that I haven't been able to track down yet.

That's good news!

> Here's the code followed by the errors:
> 
> class SAX_EXPORT InputSource    <- line 135
> {
> public:
> ...
> 
> C:\Xerces\Xerces-C\xerces-c1_5_2-win32\include\sax/InputSource.hpp(135) :
> error
> C2054: expected '(' to follow 'class'

[snip]

> class XMLExcepts   <- line 6
> {
> public :
> 
> C:\Xerces\Xerces-C\xerces-c1_5_2-win32\include\util/XMLExceptMsgs.hpp(6) :
> error
>  C2061: syntax error : identifier 'XMLExcepts'
> C:\Xerces\Xerces-C\xerces-c1_5_2-win32\include\util/XMLExceptMsgs.hpp(6) :
> error
>  C2059: syntax error : ';'
> 
> 
> There are a few others in other files, but they're all similar to this.  One
> question - what do you use the SAX_EXPORT tag for in the InputSource class
> definition?

First, most of the Xerces-C code was written by IBM people, once in
silicon valley, now in Toronto. I've added very little code to the
project. I maintain the Perl port.

I've never completely understood the FOO_EXPORT stuff. Part of it is
resolved in util/XercesDefs.hpp and part in you compiler's *Defs.hpp
file.

Heres the part from XercesDefs.hpp:

#if defined(PROJ_SAX4C)
#define SAX_EXPORT PLATFORM_EXPORT
#else
#define SAX_EXPORT PLATFORM_IMPORT
#endif


and here's the piece out of util/Compilers/VCPPDefs.hpp:

// ---------------------------------------------------------------------------
//  A define in the build for each project is also used to control whether
//  the export keyword is from the project's viewpoint or the client's.
//  These defines provide the platform specific keywords that they need
//  to do this.
// ---------------------------------------------------------------------------
#define PLATFORM_EXPORT     __declspec(dllexport)
#define PLATFORM_IMPORT     __declspec(dllimport)

So it looks like the macro isn't getting resolved properly on
Windows. On Linux PLATFORM_EXPORT/IMPORT are both empty strings so it
works regardless. 

jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to