I made the following changes to the code
xsltc-0.3.tar.gz in order to allow compilation on
Solaris 5.8, unis GNU g++:
in depend.sh
comment out CC
use cpp method, but swap g++ for /usr/ccs/lip/cpp
in xpath/Expr.h
line 440,598
add const keyword
correspondingly:
in xpath/AttributeExpr.cpp
in xpath/ElementExpr.cpp
line 42
add const keyword
in compiler/CompilerState.h
line 164
change ErrorLevel -> ErrorObserver::ErrorLevel
in main/xsltc.cpp
line 101
add cast of (String &) before *xslFilename
in compiler/CompilerState.cpp
line 377
change ErrorLevel -> ErrorObserver::ErrorLevel
line 188
create String object to pass to recieveError,
instead of passing const char *
in compiler/XSLTCompiler.cpp
line 179
line 189
line 229
add int keyword when declaring 'i' in for loop
This then compiled very smoothly.
I then went into the test directory and ...
../bin/xsltc test.xsl test
Arithmetic Exception (core dumped)
Oh dear. Did I do something wrong?
Perhaps I should try 0.4 code?
Regards,
Stewart
Logged In: NO
The result above was from running on an Intel processor box.
The exact same instruction followed on a Sparc machine,
still running Solaris (obviously) gave:
XSLTC 0.3 (build 1070) - (C) 2000 Olivier Gerardin
Bus Error (core dumped)
Oops
Logged In: NO
The Bus Error is fixed by:
in file main/xsltc.cpp
declare xslFilename as a String instead of a char *,
then use xslFilename.length()==0 to check if it's empty,
and use xslFilename.toCharArray() to return a char * to the
function ifstream xslInput()
The compiler should now produce a .h and .cpp from a .xsl
Getting the .h and .cpp to compile is the next problem...
Logged In: NO
It seems the .h and .cpp files are produced correctly, but
when it comes to compiling them, there are problems passing
string literals (const char *) into various methods
expecting String references (String &).
There's also linking problems with "undefined reference"
errors.
One of the test xsl files (identity.xsl) did compile
without any problems, but when I pass identity.xml through
it, it gives:
Segmentation Fault (core dumped)
Stewart