C++/C Interface

The C++/C Interface makes it possible to integrate XSL Formatter V3.4 into C++/C programs.

Header files

The following header files are included in [Install directory]/include.

Header file Contents Location
xfoifc.h Header for C++ [Install directory]/include
xfoifc_c.h Header for C

Library files

The following library files are included in [Install directory]/lib or [Install directory]/lib.

Library file Contents Location
XfoInterface.dll C++/C Interface Library for Windows [Install directory]
libXfoInterface.so C++/C Interface Library for Solaris/Linux/AIX [Install directory]/lib
libXfoInterface.dylib C++/C Interface Library for Macintosh
libXfoInterface.sl C++/C Interface Library for HP-UX

In the Windows version the following library file for link is included in [Install directory]/lib.

Library file Contents Location
XfoInterface.lib Library for DLL linking [Install directory]/lib

Compiler issues

Windows

XSL Formatter V3.4 Windows version is built using Microsoft Visual C++ 6.0. MFC is not used (without GUI). Please use a compatible compiler for your program.

Solaris

In XSL Formatter V3.4 Solaris version is built using Sun ONE Studio 7, Compiler Collection. Please use a compatible compiler for your program.

Linux

In XSL Formatter V3.4 Linux version is built using GCC 3.2.X. Please note that the C++ binaries are incompatible with GCC 3.2 (or later) and earlier versions of GCC releases including 3.1.1, 3.0 and 2.9. Your program must be compiled using GCC 3.2 or later. For more detailed information about GCC, please refer to the GCC home page.

Macintosh

XSL Formatter V3.4 Macintosh version is built using GCC 3.3 contained in Mac OS X Xcode Tools.

HP-UX

XSL Formatter V3.4 HP-UX version is built using HP aC++.

AIX

XSL Formatter V3.4 AIX version is built using VisualAge C++.

Building the sample programs

[Install directory]/samples/cpp and [Install directory]/samples/c includes some simple sample programs.

Windows

In order to build a sample with the command line of VC++ in the Windows environment, the compiler is executed as follows from the console.

> cd [Install directory]/samples/cpp
> cl -GX -I ..\include sample.cpp ..\lib\XfoInterface.lib

[Install directory]/lib must be appended to the PATH environment variable in order to execute this program. The sample executes as follows.

> sample sample.fo sample.pdf

Solaris/Linux

The following command-line shows how to build the command-line in the Solaris environment. Be sure to specify libaxfosvrmp.so to the linker as the library. [Install directory]/lib must be appended to LD_LIBRARY_PATH environment variable.

$ cd [Install directory]/samples/cpp
$ LD_LIBRARY_PATH=../lib:${LD_LIBRARY_PATH}
$ export LD_LIBRARY_PATH
$ CC sample.cpp -I../include -L../lib -lXfoInterface -osamplecppcmd

In order to execute the built command, a setup of other environment variables, AXF3_LIC_PATH etc, is also necessary. Please refer to Environment Variables for more details.

If you want to use GCC in the Linux environment, simply change the CC command to any GCC command-line such as gcc or g++ or cpp. As mentioned previous, the GCC version is very important. Please check your GCC version using --version command-line option.

$ g++ --version
g++ (GCC) 3.2.2
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

API Specification

Please refer to the document that was generated by Doxygen.



Copyright © 1999-2005 Antenna House, Inc. All rights reserved.
Antenna House is a trademark of Antenna House, Inc.