Debian Codegraph @

README

raw
1 See the documentation in the doc/ directory for information about how
2 to use the ctemplate library.
3
4 COMPILING
5 ---------
6 To compile test applications with these classes, run ./configure
7 followed by make. To install these header files on your system, run
8 'make install'. (On Windows, the instructions are different; see
9 README.windows.) See INSTALL for more details.
10
11 This code should work on any modern C++ system. It has been tested on
12 Linux (Ubuntu, Fedora, RedHat), Solaris 10 x86, FreeBSD 6.0, OS X 10.3
13 and 10.4, and Windows under both VC++7 and VC++8.
14
15 There are a few Windows-specific details; see README.windows for more
16 information.
17
18 CTEMPLATE AND THREADS
19 ---------------------
20 The ctemplate library has thread support, so it works properly in a
21 threaded environment. For this to work, if you link libraries with
22 -lctemplate you may find you also need to add -pthread (or, on some
23 systems, -pthreads, and on others, -lpthread) to get the library to
24 compile. If you leave out the -pthread, you'll see errors like this:
25
26 symbol lookup error: /usr/local/lib/libctemplate.so.0: undefined symbol: pthread_rwlock_init
27
28 If your code isn't multi-threaded, you can instead use the
29 ctemplate_nothread library:
30 -lctemplate_nothreads
31
32 To summarize, there are two ways to link in ctemlpate in non-threaded
33 applications. For instance:
34 1) gcc -o my_app my_app.o -lctemplate -pthread
35 2) gcc -o my_app my_app.o -lctemplate_nothreads
36
37 If your application uses threads, you should use form (1).