Next: Module TArray
Up: Module SysTools
Previous: Dynamic linker
  Contents
  Index
CxxCompilerLinker class
This class provides the services to compile C++ code and building
shared libraries, using the same compiler and options which have
been used to create the SOPHYA shared library.
The sample program below illustrates using this class to build
the shared library (myfunc.so) from the source file myfunc.cc :
#include "cxxcmplnk.h"
// ...
string flnm = "myfunc.cc";
string oname, soname;
int rc;
CxxCompilerLinker cxx;
// The Compile method provides a default object file name
rc = cxx.Compile(flnm, oname);
if (rc != 0 ) { // Error when compiling ... }
// The BuildSO method provides a default shared object file name
rc = cxx.BuildSO(oname, soname);
if (rc != 0 ) { // Error when creating shared object ... }
Reza Ansari
2001-03-07