Compiling on UNIX platforms

EAServer Manager generates a make.unix file when you generate the component skeleton as described in “Generating required C++ files”. To build your shared library, run the following command:

make -f make.unix 

On Solaris, when linking component shared libraries or client binaries, you must link with the EAServer libraries that match your compiler version. Choose the appropriate directory from those listed below:

The generated Solaris make files link with 6.x libraries by default. To use 4.x libraries, edit the definition of the LIB macro in the make file, and change the paths to the library directories. The library and binary format is different between version 6.x and version 4.x compilers. Use the compiler version that the server is running with. By default, the server runs with version 6.x compatibility, but you can override this when starting the server. For more information, see “Starting the server” in the EAServer System Administration Guide.

The generated UNIX make file for C++ components works on other platforms without changes. Platform-specific information is defined in the file make.include.platform, where platform is the name returned by the command:

uname -s

The make.include.platform includes the necessary settigngs to run the compiler and linker in the component make file. You may need to edit these settings if your compiler and linker are not installed in the standard location, or you use different software.

If you generate stub and skeleton files at the same time, EAServer Manager automatically adds the location of the component stub files to the makefile. If you move the component source files to another machine, make sure that you copy the stub files as well and specify their location in the makefile. You specify the component stub files location by adding /Istub_location to the .ccp.obj rule in the makefile. stub_location is the directory in which the component stub files reside.

After building the shared library, copy it to the cpplib directory of your EAServer installation.

NoteIf you do not place the component shared library in the EAServer cpplib subdirectory, the directory containing the shared library must be specified in the shared library search path environment variable for your platform (for example, LD_LIBRARY_PATH for Solaris).