[Enterprise Extensions only]

Building a C++ CORBA server

This topic provides an overview of the task to build the code for a C++ CORBA server. The actual steps that you complete depend on the development environment that you use.

For example, if you are using the Microsoft C++ 6.0 compiler on Windows NT to build a C++ CORBA server, you can use the following commands:

  1. Compile the server.cpp, servant_I.cpp, and servant_S.cpp files.

    At a command line, type the following command for each file:

    -DSOMCBNOLOCALINCLUDES -D_MS_INC_DIR=msvc60_install\include
    -D_USE_NAMESPACE -DNO_STRICT -Imsvc60_install\include -Imsvc60_install\include
    -Iwasee_install\include -I. filename

    Where

    msvc60_install
    is directory in which the Microsoft C++ 6.0 compiler is installed; for example, d:\msvc60\vc98.
    wasee_install
    is the directory into which WebSphere Application Server enterprise services is installed.
    filename
    is the name of the file to be compiled (server.cpp, servant_I.cpp, or servant_S.cpp).

  2. link /nologo /DEBUG /OUT:WSLoggerServer.exe
    /DEFAULTLIB:\WebSphere\AppServer\Enterprise\lib\somosa1m.lib
    \WebSphere\AppServer\Enterprise\lib\somororm.lib \WebSphere\AppServer\Enterprise\lib\somsrvsm.lib
    servantServer.obj servant_I.obj servant.obj

This task is one step of the parent task, Developing a CORBA client.

For more examples of building C++ CORBA server code (on several platforms) for WebSphere Application Server, see the samples article "Tutorial: Creating a user-defined C++ server and client" at WAS_HOME/Enterprise/samples/sampeex/sampcppsdk/wsBuildLogger.htm.