How to build SQLAPI under windows with mingw¶
Set the build environment¶
Due to license restrictions, SQLAPI can't be added to Anubis source tree.
To compile Anubis VM with SQLAPI, you have to get a copy of SQLAPI (trial
version or registered one) and uncompress all files into this folder.
Then, add "SQLAPI=1" into scons command line building the VM.
You may need to recompile the SQLAPI library to be able to be linked with the VM.
To do so, edit the file 'sqlapi_mingw.bat' located in SQLAPI/src/
The beginning of the file contain the location of the mingw installation use for compiling. if the current path doesn't correspond to your environment, you need to change the path according to your mingw installation.
@echo off rem set path=D:\MinGW\4.9.2-tdm64\bin;%PATH% rem set path=d:\mingw\4.7.2\bin;%PATH% rem set path=d:\mingw\4.6.2\bin;%PATH% rem set path=d:\mingw\4.5.1\bin;%PATH% rem set path=d:\mingw\4.4.1\bin;%PATH% set path=d:\mingw\3.4.2\bin;%PATH% rem set path=c:\Dev-Cpp\bin;%PATH% rem set PATH=C:\Program Files\CodeBlocks\MinGW\bin;%PATH% rem set path=c:\mingw\bin;%PATH%
Set the SA_OPTIONS¶
Due to embedded environment and media size restriction, maybe you want to compile an Anubis VM with support of only Postgresql by SQLAPI. The support of the others DBMS is a waste of space in your case. Building SQLAPI library with that needs is possible by setting the right option in SA_OPTIONS, described bellow.
In the file 'sqlapi_mingw.bat' located in SQLAPI/src/ you can set the compiling options for SQLAPI. This is done by setting the wanted options in SA_OPTIONS, in the end of the file 'sqlapi_mingw.bat'. By default the SA_OPTIONS is set as follow with support of all DBMS 'SA_CLIENT_ALL=1':
set SA_OPTIONS=SA_CLIENT_ALL=1 SA_DEFINE=SA_NO_TRIAL SA_UNICODE=1 SA_USE_PCH=1