The C/C++ Interface makes it possible to integrate AH Formatter V5.0 into C/C++ programs.
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 |
The following library files are included in [Install directory]/lib or [Install directory]/lib.
Library file | Contents | Location |
---|---|---|
XfoInterface50.dll | C/C++ Interface Library for Windows | [Install directory] |
libXfoInterface.so | C/C++ Interface Library for Solaris / Linux | [Install directory]/lib |
libXfoInterface50.so | C/C++ Interface Library for AIX | [Install directory]/lib |
libXfoInterface.dylib | C/C++ Interface Library for Macintosh | [Install directory]/lib |
libXfoInterface.sl | C/C++ Interface Library for HP-UX | [Install directory]/lib |
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 |
AH Formatter V5.0 Windows version is built using Microsoft Visual C++ 8.0. MFC is not used without GUI. Please use a compatible compiler for your program.
AH Formatter V5.0 Solaris version is built using Forte Developer 7 C++ 5.4 or Sun Studio 11. Please use a compatible compiler for your program.
AH Formatter V5.0 Linux and Linux 64bit version is built using GCC 3.4.X. Your program must be compiled using GCC 3.4 or later. For more detailed information about GCC, please refer to the GCC home page.
AH Formatter V5.0 Macintosh version is built using GCC 4.0 contained in Mac OS X Xcode Tools.
AH Formatter V5.0 HP-UX version is built using HP aC++.
AH Formatter V5.0 AIX version is built using VisualAge C++.
[Install directory]/samples/cpp and [Install directory]/samples/c includes some simple sample programs.
In order to build a sample with the command line of Visual C++ in the Windows environment, execute the compiler from the console as follows.
> cd [Install directory]/samples/cpp > cl -EHsc -I ..\..\include sample.cpp ..\..\lib\XfoInterface.lib /MT
To build the executables for Windows, use the command prompt from [Start]-[Microsoft Visual Studio 2005]-[Visual Studio Tools].
[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
The following command-line shows how to build the sample in the Solaris environment. Be sure to specify libXfoInterface.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 -mt
In order to execute the built sample program, a setup of other environment variables is necessary. Please refer to Environment Variables for more details.
The following command-line shows how to build the sample in the Linux environment using GCC.
$ cd [Install directory]/samples/cpp $ LD_LIBRARY_PATH=../lib:${LD_LIBRARY_PATH} $ export LD_LIBRARY_PATH $ g++ sample.cpp -I../include -L../lib -lXfoInterface -oSamplecppcmd -lstdc++ -lpthread
In order to execute the built sample program, a setup of other environment variables is necessary. Please refer to Environment Variables for more details.
As mentioned previous, the GCC version is very important. Please check your GCC version using --version command-line option.
$ g++ --version g++34 (GCC) 3.4.6 20060404 (Red Hat 3.4.6-4) Copyright (C) 2006 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.
In order to build a sample with the command line of HP aC++ in the HP-UX environment, execute the compiler from the console as follows.
$ cd [Install directory]/samples/cpp $ SHLIB_PATH=../lib:${SHLIB_PATH} $ export SHLIB_PATH $ aCC sample.cpp -I../include -L../lib -lXfoInterface -mt -oSamplecppcmd
If you use HP-UX PA-RISC version, add "-AA" to the compile command line.
$ aCC sample.cpp -I../include -L../lib -lXfoInterface -mt -AA -oSamplecppcmd
To execute the built sample program, a setup of other environment variables is also necessary. Please refer to Environment Variables for more details.
In order to build a sample with the command line of VisualAge C++ in the AIX environment, execute the compiler from the console as follows.
$ cd [Install directory]/samples/cpp $ LD_LIBRARY_PATH=../lib:${LD_LIBRARY_PATH} $ export LD_LIBRARY_PATH $ xlC sample.cpp -I../include -lXfoInterface42 -L../lib -brtl -oSamplecppcmd
To execute the built sample program, a setup of other environment variables is also necessary. Please refer to Environment Variables for more details.
Please refer to the document that was generated by Doxygen.