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 112 113 114 115 116 117 118 119
|
LIBPQTYPES INSTALLTION GUIDE
----------------------------
*) UNIX BUILDS
For quick builds, run the below:
]# ./configure
]# make
]# make install
(Also `make uninstall', which removes all installed headers,
libs and mans pages)
By default, only a shared library is built. To build a static
library, use the `--enable-static' option.
To build a thread-safe version, use the `--enable-thread-safety' option.
To use libpqtypes in a thread-safe environment, the system must have
pthreads installed. Most systems will have /usr/include/pthread.h
and /usr/lib/libpthread.so or /usr/lib/libthread.so.
The default prefix is `/usr/local', so if the `--prefix' option is
not specified the header file(s) will be installed at
/usr/local/include and the library file(s) will be installed at
/usr/local/lib.
If your system doesn't include a `long long' data type, resulting in
a library compile error, you can specify an alternative by setting
PQT_LONG_LONG=data_type during configure.
]# CFLAGS="-DPQT_LONG_LONG=my_int8" ./configure
Files installed:
- $(prefix)/include/libpqtypes.h
- $(prefix)/lib/libpqtypes.so
When `--enable-static' is specified:
- $(prefix)/lib/libpqtypes.a
To dynamically link with libpqtypes, pass -lpqtypes to the linker.
*) MINGW AND CYGWIN BUILDS
There is no configure for MinGW or Cygwin. Execute the below from
the root of the source tar ball within the cygwin shell or msys.
]# make -f Makefile.win32 [options] [targets]
*) MSVC BUILDS
MSVC versions 6, 7 and 8 have all been tested. Versions prior to 6
may work but are not supported.
The MSVC build uses `nmake' and can be executed from the root of the
source tar ball at a DOS prompt:
> nmake -f win32.mak [options] [targets]
*) MINGW, CYGWIN & MSVC BUILDS:
For the below examples, MAKE is defined as:
# MSVC
MAKE = nmake -f win32.mak
# CYGWIN & MINGW
MAKE = make -f Makefile.win32
Targets:
all - build the libpqtypes library
test - build the libpqtypes regression test
clean - delete all files generated by compiles
install - Install the binaries, headers and man3 pages
uninstall - Uninstalls libpqtypes, reverse of install target
Thread-safe:
$(MAKE) MT=1
NOTE: MinGW and/or Cygwin may require installing pthreads.
Specify alternative 64-bit int data type:
$(MAKE) PQT_LONG_LONG=my_int8
Global make & nmake compiler/linker variables:
CC = C compiler
INC = includes
CFLAGS = compiler flags
LPATH = library path. MINGW and CYGWIN use -L while MSVC can supply a single path
# If libpq is not installed and you use MSVC, try this (replace paths):
> $(MAKE) INC="-Ic:\pgsql\src\interfaces\libpq" LPATH="-Ic:\pgsql\src\interfaces\libpq\Release"
Files generated:
libpqtypes.dll - Windows DLL
libpqtypesdll.lib - Import lib for DLL
libpqtypes.lib - Static library
Where to install files:
- System Include Path: libpqtypes.h
- System Library Path: libpqtypes.dll
- System Library Path: libpqtypesdll.lib
- System Library Path: libpqtypes.lib (static lib)
|