Installing and Using Vortex Library


On this page you will find:

Getting latest stable release

The Vortex Library main repository is included inside the Af-Arch repository. Af-Arch project uses Vortex Library as its data transport layer.

If you are planing to download Vortex Library and using it as a stand alone library apart from Af-Arch you can get current stable releases at:

Getting latest sources from svn repository

You can also get the latest repository status, which is considered to be stable, by checking out a svn copy executing the following:

   svn co

If you are using Microsoft Windows platform use the url above. SubVersion client programs for windows can be found at: (really recommended) or

Of course you will have to download the Vortex Library dependencies. Check the this section to know more about library dependencies.

Compiling Vortex Library on GNU/linux environments (including Cygwin)

If you are running a POSIX (unix-like including cygwin) environment you can use autotools to configure the project so you can compile it. Type the following once you have downloaded the source code:

   bash:~$ cd libvortex
   bash:~/libvortex$ ./

This will configure your project trying to find the dependencies needed.

Once the configure process is done you can type:

   bash:~/libvortex$ make install

The previous command will require permissions to write inside the destination directory. If you have problems, try to execute the previous command as root.

Because readline doesn't provide an standard way to get current installation location, the following is provided to configure readline installation. You have to use the READLINE_PATH environment var as follows:

   bash:~/libvortex$ READLINE_PATH=/some/path/to/readline make

make program will use the content of READLINE_PATH var to build an include header directive and an include lib directive as follows:



You don't need to pay attention to this description if you don't have problems with your readline installation.

Compiling Vortex Library on Windows Platforms using Mingw

Inside the src directory can be found a file. This have been created to be run under mingw environment. You will have to download the mingw environment, the msys package and optionally the pkg-config program.

The will find the library dependencies through pkg-config program or by a directory configured.

The pkg-config method is preferred because is easy to use but it have no difference (or special effect) on source code if you provide the directory where libraries can be found.

If you chose the pkg-config method you have to ensure the will find the include flags and import libraries while executing:

   pkg-config --cflags --libs glib-2.0 libxml-2.0

Once you have ensured the pkg-config will provide the right references to the type the following:

  CC=gcc-3.3 vortex_dll=libvortex MODE=console make -f

Of course, the CC variable may point to another gcc, check the one that is installed on your system but, make sure you are not using the gcc provided by a cygwin installation. It will produce a faulty libvortex.dll not usable by any native Microsoft Windows program.

The MODE variable can be set to "windows". This will disable the console output. "console" value will allow to enable vortex log info to console.

The vortex_dll variable must not be changed. This variable is controlled by a top level inside the Af-Arch project so that can control the library naming. To follow the same convention naming will save you lot of problems in the future.

Additionally, if you chose to provide the libraries directly you will have to download the libraries the Vortex Library depends on inside a directory, for example, "c:\libraries". Use lowercase letter for your files and directories names, it will save you lot of time. Now, edit the to comment out those lines referring to pkg-config (LIBS and CFLAGS) and uncomment those lines referring to BASE_DIR variable.

Now type:

  CC=gcc-3.3 vortex_dll=libvortex MODE=console BASE_DIR=c:/libraries make -f

This process will produce a libvortex.dll (actually the dynamic libraries) and a import library called libvortex.dll.a. The import library will be needed to compile your application under windows against Vortex Library so it get linked to libvortex.dll.

Using Vortex on GNU/Linux platforms (including Cygwin)

Once you have installed the library you can type:
   gcc `pkg-config --cflags --libs vortex` your-program.c -o your-program

On windows platform using cygwin the previous example also works.

Using Vortex on Microsoft Windows with Mingw

On mingw environments you should use something like:

  gcc your-program.c -o your-program
        -Ic:/libraries/include/vortex/  \
        -I"c:/libraries/include" \
        -I"c:/libraries/include/glib-2.0" \
        -I"c:/libraries/include/libxml2" \
        -I"c:/libraries/lib/glib-2.0/include" -I"." 
        -L"c:/libraries/lib" \
        -L"c:/libraries/bin" \
        -L"c:/libraries/lib/glib-2.0" \
        -lws2_32 \
        -lglib-2.0 \
        -lgmodule-2.0 \
        -lgobject-2.0 \
        -lgthread-2.0 \
        -lxml2 \
        -lintl  -liconv  -lm 

Where c:/libraries contains the installation of the Vortex Library (headers files installed on c:/libraries/include/vortex, import library: libvortex.dll.a and dll: libvortex.dll), glib-2.0 installation and libxml-2.0 installation.

Because glib-2.0 also depends on libiconv and gettext you will have to provide the -lintl and -liconv flags. The -lws2_32 will provide winsocks2 reference to your program.