Using the Xerces-C parser on SunOS5.8Solaris7

zhaozj2021-02-16  28

Using the Xerces-C parser 1 on SunOS5.8 / Solaris7, download to binary version: Xerces-C2_4_0-Solaris_27-cc_62.tar.gz2, unzipped to: Xerces-C2_4_0-Solaris_27-CC_62 directory structure: XERCES-C2_4_0-Solaris_27 -CC_62 (for simple start, after reancing to Xerces) bin // samples (author is SunOS 5.8, all of which cannot be implemented, need to recompile) DOC // Document ETC // ignore it include include / / Include file lib // Library file Samples // Sample source 200. Scripts // ignored it 3, first there is three files LIBXERCES-C.SO 0 byte (useless) libXERCES-C.SO. 24 0 bytes (useless) libXERCES-C.SO.24.0 7M Multi-compile links, libraries: libXerces-C.SO.24.0, but the program is running is LIBXERCES-C.SO.24, but LIBXERCES- C. SO.24 file is only 0 bytes, obviously do not recognize, and then renamed LIBXERCES-C.SO.24.0 to libXerces-C.SO.24, and the example runs normally (I only compile DOMPRINT).

4, compilation process (because I don't know some of the GNU, it is stupid) ** Several environment variables need to be set: Xercescroot = $ Oiedir / CFRTEST / XML / XERCES Export Xercescroot Add / Xerces / Include Go to the Samples Directory in LD_Library_Path (Generate Make File), run runconfigure (./ Runconfigure -p -c -x ) such as: ./ Runconfigure-psolaris -ccc-xcc, but one ./configure cannot run errors, and then manually run:. ./configure, automatically generate all Make files.

** (Compilation) Go to the Domprint directory: When you run Make, when you don't have a mistake, you will have an error, and you will find that the machine cannot run the statement such as IFEQ. There are two sentences in automatically generated Makefile: include include $ {Xercescroot} /version.incl include ../makefile.incl is in Makefile.inCl, which is mainly different parameters for different platforms. Only copying all the statements about the Solaris platform to this makefile in this makefile (Statement INCLUDE $ {xercescroot} /version.incl), and found to generate .o files, but error, this is mainly library File name setting problem.

** (link) Since there is already a target file, you don't have to use the Make file, the CC is run directly as follows: cc -l / usr / lib / userHome / OieApp / OiesVR / CFRTEST / XML / XERCES / BIN / OBJ / DOMPRINT / DOMPRINT. O /UserHome/oieapp/oiesvr/cfrtest/xml/xercept/bin/obj/domprint/domtreeerrorreporter.o /userHome/oieapp/oiesvr/cfrtest/xml/xerces/bin/obj/Domprint/Domprintfilter.o / usrhome / OieApp / Oiesvr / cfrtest / XML / XERCES / BIN / OBJ / DOMPRINT / DOMPRINTERRORHANDLER.O -O / USERHOME / OIEAPP / OIEESVR / CFRTEST / XML / XERCES / BIN / DOMPRINT / USERHOME / OIEAPP / OIESVR / CFRTEST / XML / XERCES / LIB / LIBXERCES-C.SO.24.0 -LC -lgen The difference between the Makefile statement is: no -l parameter specify the library, and directly written the full path to libXerces-C.SO.24.0 (if renamed LIBXERCES-C .SO.24, use the named name). Everything is OK! ** (Operation) If there is no name of the library file, there is no file with two sizes of 0, and the LIBXERCES-C.SO.24 unknown type file is wrong, and the rename is normal (put libxyerces-c.so) . 24.0 renamed LIBXERCES-C.SO.24). As: $ domprint class.xml ]> Calculus math Jim Green jack mary paul

** Of course, there are some details, mainly the path or environment variables (for example, I have changed Xercescout into Xercescroot, this is not necessary, if not, you need to set the Xercescout environment variable).

After the Makefile is as follows:

PLATFORM = SOLARISCOMPILER = CCGCC = GXX = CXXFLAGS = -gCFLAGS = -gLDFLAGS = THREADS = EXTRA_LIBS = PREFIX = / usr / local # The following three actually include $ {XERCESCROOT} /version.incl alternative VER = 2_4_0SO_TARGET_VERSION = 24SO_TARGET_VERSION_MAJOR = 0

#Begin from include ../makefile.incl to include = -i. -I $ {xercescroot} / includeelib_dir = $ {xercescroot} / liblibname = XercesctHisLib = $ {lib_dir} / $ {libname}

Library_names = -l $ {libname} library_search_paths = -l $ {lib_dir} to = O

CMP = -c $ {CXXFLAGS} CC = CC -c -D $ {PLATFORM} -D_REENTRANT -picLINK = CC -D $ {PLATFORM} $ {LDFLAGS} PLATFORM_LIB_LINK_OPTIONS = -L / usr / libEXTRA_LINK_OPTIONS = -lc -lgen $ { EXTRA_LIBS} shlibsuffix = .so # end from include ../makefile.incl

App_name = DOMPRINT

# Is turned XERCESCROOT XERCESCOUTOUTDIR = $ {XERCESCROOT} / bin / obj / $ {APP_NAME} EXEC = $ {XERCESCROOT} / binOBJS = $ {OUTDIR} /DOMPrint.o $ {OUTDIR} /DOMTreeErrorReporter.o $ {OUTDIR} / DOMPrintFilter .o $ {OUTDIR} /DOMPrintErrorHandler.oSRC= $ {XERCESCROOT} / samples / $ {APP_NAME} HEADER_FILES = $ {SRC} /DOMTreeErrorReporter.hpp $ {SRC} /DOMPrintFilter.hpp $ {SRC} /DOMPrintErrorHandler.hpp

# These sentences can also not comment #makedir :: # -mkdir -p $ (Outdir)

# The final link command has made some changes to the following sentence (see above) $ {exec} / $ {app_name}: $ {{platform_lib_link_options} $ {Objs} -o $ @ @} $ {LIBRARY_SEARCH_PATHS} $ {LIBRARY_NAMES} $ {EXTRA_LINK_OPTIONS} $ {BATCH_TARGET} :: $ {OBJS} $ {LINK} $ {PLATFORM_LIB_LINK_OPTIONS} $ {OBJS} -o $ @ $ {LIBRARY_SEARCH_PATHS} $ {LIBRARY_NAMES} $ {EXTRA_LINK_OPTIONS}

$ (Outdir) /domprint.o :: $ {src} /domprint.cpp $ {header_files} $ {cc} -i / userhome / OieApp / OiesVR / CFRTEST / XML / XERCES / INCLUDE $ {cmp} -o $ Outdir /domprint.o $ {src} /domprint.cpp

$ (Outdir) /domtreeerrorreporter.o :: $ {src} /domtreeErReporter.cpp $ {header_files} $ {cc} -i / userhome / OieApp / OiesVR / CFRTEST / XML / XERCES / INCLUDE $ {CMP} -o $ ( OUTDIR) /DOMTreeErrorReporter.o $ {SRC} /DOMTreeErrorReporter.cpp$ (OUTDIR) /DOMPrintFilter.o :: $ {SRC} /DOMPrintFilter.cpp $ {HEADER_FILES} $ {CC} -I / userhome / oieapp / oiesvr / cfrtest / xml / xerces / include $ {CMP} -o $ (OUTDIR) /DOMPrintFilter.o $ {SRC} /DOMPrintFilter.cpp $ (OUTDIR) /DOMPrintErrorHandler.o :: $ {SRC} /DOMPrintErrorHandler.cpp $ {HEADER_FILES} $ {Cc} -i / userhome / OieApp / OiesVR / CFRTEST / XML / XERCES / INCLUDE $ {cmp} -o $ (outdir) /Domprinterrorhandler.o $ {src} /domprinterrorhandler.cpp

# These sentences can also not comment #clean :: # rm -f $ {objs} $ {exec} / $ {app_name} ## distclean :: clean # rm -f makefile

转载请注明原文地址:https://www.9cbs.com/read-27918.html

New Post(0)