For components that run on Windows, you must build a DLL that contains your C++ component methods. After building the DLL, copy it to the cpplib directory of your EAServer installation.
If you do not place the component DLL in the EAServer cpplib subdirectory, the directory containing the DLL must be specified in the PATH environment variable.
You can use EAServer Manager to generate a makefile and module definition (.def) file. See “Generating required C++ files” for instructions on generating a makefile and .def file with EAServer Manager.
Before compiling your C++ component using nmake with the generated makefile, verify that the makefile can find the directory containing the ODBC header files and libraries. You must set the ODBCHOME environment variable to the directory containing the ODBC header files and libraries. If you have Microsoft Visual C++ and ODBCHOME is not set, the makefile looks in C:\msdev (which is the default installation directory for Microsoft Visual C++) for these files.
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 /I
stub_location to
the .ccp.obj
rule in the makefile. stub_location is
the directory in which the component stub files reside.
To build your DLL, run this command from a command window in your component’s source directory:
nmake -f make.nt
If you make changes to the makefile, rename it so it won’t be overwritten when you regenerate the required files.
Copyright © 2005. Sybase Inc. All rights reserved. |