To be able to compile the Erlang ODBC application on Windows the following are required:
The C-part of Erlang ODBC application on Windows should be compiled with Visual C++ version 5.0 or higher. Visual C++ require certain environment variables to be set properly, i.e., point to the subdirectories of your Visual C++ installation:
\bin
directory
\lib
dircetory.
\include
dircetory.
When you install Visual C++, the batch file VCVARS32.BAT is created, which contains commands for modifying the PATH, LIB and INCLUDE environment variables. If these variables have not been set properly, run VCVARS32.BAT, located in the \bin subdirectory, before you compile at the command prompt.
After installing Erlang, the Erlang ODBC application source code
is located in the
<OTPROOT>\lib\odbc-<odbcversion>\src
subdirectory. <OTPROOT> is normally the path
"C:\Program Files\erl<erlang version>"
. In this
subdirectory you find a Makefile, in which there is a
path to the ODBC import library and paths to the header
files used by the Erlang ODBC application. These paths must be set
properly.
As mention before Erlang ODBC application requires the ODBC import library (ODBC32.LIB) and header files. The Visual C++ \lib subdirectory contains the import library and \include the header files. Hence, depending on where Visual C++ is installed, set the variables in the Makefile to:
ODBCLIBS = "C:\Program Files\Microsoft Visual Studio\VC98\lib\Odbc32.lib"
ODBCINCLUDE = "C:\Program Files\Microsoft Visual Studio\VC98\include"
The Erlang ODBC application uses the Erl_interface header files and
lib file. The variable EIROOT defines
the path to the Erl_Interface application, e.g.
$(OTPROOT)\lib\erl_interface-3.2.3
.
EIROOT must point to the version of Erl_Interface you intend to use,
e.g., you might have to change the subdirectory
erl_interface-3.2.3
to represent a later version.
<OTPROOT>\lib\odbc-<odbcversion>\src
subdirectory.
nmake
.