To be able to compile the Erlang ODBC application on Unix the following are required:
The C-part of Erlang ODBC application on Unix should be compiled
with GCC C-compiler version 2.7.2 or higher. The GCC C-compiler
must be found in the PATH
environment variable.
This is easily verified
by running the Unix command which gcc
.
After installing Erlang, the Erlang ODBC application source code
is located in the
<OTPROOT>/lib/odbc-<odbcversion>/src
subdirectory. <OTPROOT> can, for example, be the path
/usr/local/erlang
.
In this subdirectory you find a Makefile, in which there is a
path to the ODBC import library and the header files.
These paths must be set properly.
As mentioned earlier, Erlang ODBC application depends on the ODBC import library and header files, which are a part of the ODBC driver for your database.
To be able to access the import library you must set the
variables ODBCLDFLAGS,
ODBCLIBS and ODBCINCLUDE properly in the Makefile.
ODBCLDFLAGS defines the path of ODBC import library,
ODBCLIBS defines the name of ODBC import library and
ODBCINCLUDE defines the path to the ODBC header files.
The Erlang ODBC application also uses header files from the
Erl_Interface.
Hence, the variable EIROOT, which defines the path to the Erl_Interface
application, e.g., $(OTPROOT)/lib/erl_interface-3.2.3
,
must be point to the version of Erl_Interface you intend to use.
To be able to use a later version, EIROOT must be updated.
<OTPROOT>/lib/odbc-<odbcversion>/src
subdirectory.
gmake
.