Installing argtable2 on Unix systems ------------------------------------ The basic compile and install procedure for unix systems is: $ cd argtable2-x $ ./configure $ make $ make check (optional) $ sudo make install $ make clean Remember to update your system's LD_LIBRARY_PATH to include the location of the dynamic library (normally /usr/local/lib/). The configuration script will install argtable into /usr/local/ by default. To install into a different directory, specify that directory path when you run configure, as in $ ./configure --prefix=~fred/mystuff See install.txt for a detailed description of the configure script. OS X notes: 1) Mac OS X uses DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH. DJGPP notes: 1) DJGPP users may need to specify the compiler name at configure time, as in $ ./configure CC=gcc.exe Installing argtable2 on DOS/Windows systems ------------------------------------------- To build argtable.lib: > cd src > nmake -f Makefile.nmake Then copy the argtable2.h, argtable2.lib, argtable2.dll, impargtable2.lib files to wherever you choose. To build the example programs: > cd example > nmake -f Makefile.nmake Notes: 1) The arg_rex and arg_date command line argument types are not supported under Microsoft Windows because the Microsoft compilers do not provide the necessary regex.h and strptime() functions. 2) Watcom compilers may have trouble building the DLL version of the library, giving an error like this: Error! E3033: file _2FK.AAA: line(15): directive error near 'Files\dm\lib' To workaround this, edit line 34 of src/Makefile.nmake and remove the "/def:argtable2.def" from the linker stanza line 33: argtable2.dll: $(OBJS) line 34: link /DLL /OUT:$@ $** /IMPLIB:impargtable2.lib Cross-compiling argtable2 for Windows from Linux ------------------------------------------------ You can crosscompile argtable2 on Linux with Win32-platforms as target using mingw32. However, as with native Windows compilers, the arg_rex and arg_date command line argument types are not supported by mingw32 because it currently offers no regex.h nor strptime() functions. The following procedure was tested on a Debian "Sid" install with the mingw32 default packages installed. 1) Make sure, you have the mingw32-crosscompiler installed. There are precompiled packages for several distributions available. You can get the sources from http://www.mingw.org/ 2) Set the apropriate environment variables: $ export PATH=/path/to/your/mingw/bin:$PATH Usually the path is something like /usr/i586-mingw32/i586-mingw32/bin or /usr/local/i586-mingw32/bin Sometimes it helps to set also the COMPILER_PATH environment variable to your mingw-binary-path. 3) Run configure: $ cd argtable2-x $ ./configure --build=i586-linux --host=i586-mingw32msvc \ --target=i586-mingw32msvc \ --prefix=/path/to/install You most certainly want to give a different prefix than the default one. The resulting lib will not be useable by your usual ELF-loader. See argtable's INSTALL file for further configure options. 4) Build and install argtable2: $ make $ make install Please note, that this creates a static library (libargtable2.a) and a shared one (libargtable2.so), which you link to your object code in the usual way (-L/path/to/prefix/lib -largtable2 -I/path/to/prefix/include). Building of DLLs is currently not supported, but may be done by hand. A .def-file is already included in the src/ directory.