File: README

package info (click to toggle)
argtable2 6-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 6,520 kB
  • ctags: 380
  • sloc: sh: 8,918; ansic: 4,305; makefile: 144
file content (111 lines) | stat: -rw-r--r-- 3,766 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
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.