Building QuickFIX

Windows (C++)

Solution and project files are provided for building under Visual Studio. QuickFIX supports Visual Studion 6, Visual Studio 7 (2003), and Visual Studio 8 (2005). The solution files provided for these versions are quickfix_vs6.dsw, quickfix_vs7.sln, and quickfix_vs8.sln respectively.

Simply open the appropriate solution file and do a batch build of all the projects. This will create lib\quickfix.lib and lib\debug\quickfix.lib which can be linked into your applications. The header files will also be copied to the include directory.

Since windows does not have a standard system for storing header and library files, you should organize them however best suits your build environment. Leaving them in the lib and include directories they are placed into by the build is one option.

Compile time options are controlled from the config_windows.h file in the src directory. The following options are supported:

#define HAVE_STLPORT 1 Compile with stlport instead of standard visual c++ STL implementation.
#define HAVE_JAVA 1 Compiles JNI wrappers for QuickFIX library, allowing you to access QuickFIX from java.
#define HAVE_ODBC 1 Compiles ODBC support into QuickFIX.
#define HAVE_MYSQL 1 Compiles MySQL support into QuickFIX. If you enable this option, the mysql include and library directories must be in the Visual Studio search paths.
#define HAVE_MSSQL 1 Compiles MSSQL support into QuickFIX. If you enable this option, the mssql include and library directories must be in the Visual Studio search paths.
#define HAVE_POSTGRESQL 1 Compiles PostgreSQL support into QuickFIX. If you enable this option, the postgres include and library directories must be in the Visual Studio search paths.
#define HAVE_LIBXML 1 Compile and link XML parsing code against the libxml library instead of the default MSXML3.
#define ENABLE_CALLSTACK 1 Tells QuickFIX to keep track of a C++ callstack that will be printed out in the event of a the process crashing. Only use this when trying to track down a repeatable problem.

Windows (.NET)

QuickFIX comes with a .NET wrapper written in managed C++. This enables any CLR based language (i.e., C#, VB.NET) to access QuickFIX.

The instruction for building under .NET are the same as the instructions for windows listed above, however you must use the quickfix_vs7.sln or quickfix_vs8.sln files. In addition to the quickfix lib files, DLLs named quickfix_net.dll and quickfix_net_messages.dll will be placed into your lib and lib\debug directories.

Windows (Java)

To build the JNI layer, you need to make sure HAVE_JAVA is defined in config_windows.h. Before building, make sure to add the JNI include directories to your include search path. Based on your JAVA_HOME environment settings, add the jdk's include and include\win32 directories to your search path. These will probably be something like C:\jdk1.4.2\include and C:\jdk1.4.2\include\win32. Now do a batch build of all project configurations. DLLs named quickfix_jni.dll and quickfix_debug_jni.dll will be placed into your lib and lib\debug directories.

Once you have built the JNI dll, you must now build the QuickFIX java API. Simply run the build_java.bat file in the quickfix directory. A jar file name quickfix.jar will be placed into your lib directory.

Linux / Solaris / FreeBSD / Mac OS X (C++/Java)

QuickFIX uses GNU autotools (autoconf, automake, and libtool) in conjunction with make to build on unix systems. If you also want to reuse our makefiles for developing your own application, you will find it useful. Also note that if your version of gcc does not come with sstream, you will need to download it from the link above and put it in the correct include directory. Also please note for Solaris you must use GNU make, the make that comes with Solaris will not work.

Building under *nix requires two steps. First, in the root quickfix directory, type ./configure This will probe your system to find out what functionality it supports for use in determining how to build QuickFIX. After ./configure completes succesfully, simply type make to build. If you run into problems running configure, you may need to run the ./bootstrap script first.

There are some options you can pass to ./configure to enable compile time features. These are:

--with-java - Build the Java API. JAVA_HOME will be used to find Java.
--with-python=<include directory> - Build the Python API. Use directory which contains python headers.
--with-ruby - Build the Ruby API. Ruby interpreter in your path will be used.
--with-mysql=<base directory> - Compile in mysql support
--with-postgresql=<base directory> - Compile in postgresql support
--with-stlport=<base directory> - Compile with stlport instead of standard gcc STL implementation (recommended for multiprocessor machines running gcc 2.95.x)
--enable-callstack - Display C++ call stack after abnormal termination. Only use this when trying to track down a repeatable problem.

If you are using the SUNPro compiler, you will need to set the following environment variables:

CC=<full path to SUNPro CC binary>
CFLAGS=-g -xs
CXX=<full path to SUNPro CC binary>
CXXFLAGS=-g -xs
LD=<full path to SUNPro CC binary>
LDFLAGS=-g -xs -lCstd
AR=<full path to SUNPro CC binary>
AR_FLAGS=-g -xs -xar -o

After succesfully building QuickFIX, you should run make install as root. This will place the library libquickfix.so and libquickfix_jni.so if java is detected, and the quickfix header files into the appropriate directories. If you do not have root access, you can also run configure with the --prefix=<base directory> option, where the base directory is some directory which your account has write access. note: under Mac OS X, the files are called libquickfix.dylib and libquickfix_jni.jnilib, you may need to create a symlink to libquickfix_jni.so.