Giter Site home page Giter Site logo

xtestw / ctemplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from olafvdspek/ctemplate

1.0 3.0 0.0 3.16 MB

Automatically exported from code.google.com/p/ctemplate

License: BSD 3-Clause "New" or "Revised" License

Makefile 17.34% Shell 18.51% Perl 0.55% Emacs Lisp 0.46% C++ 56.77% C 3.60% Python 0.99% HTML 1.78%

ctemplate's Introduction

Welcome to the C++ CTemplate system!

This library provides an easy to use and lightning fast text templating system to use with C++ programs.

It was originally called Google Templates, due to its origin as the template system used for Google search result pages. Now it has a more general name matching its community-owned nature.

Documentation

Refer to the Project Documentation to learn how to use the CTemplate system.

There is also a HOWTO and Examples.

Compiling

To compile test applications with these classes, run ./configure followed by make on unixoid platforms like Linux or MacOSX.

To install these header files on your system, run make install.

See INSTALL for more details.

This code should work on any modern C++ system. It has been tested on Linux (Ubuntu, Fedora, RedHat), Solaris 10 x86, FreeBSD 6.0, OS X 10.3 and 10.4, and Windows under both VC++7 and VC++8.

There are a few Windows-specific details; see README.windows for more information.

CTemplate and Threads

The ctemplate library has thread support, so it works properly in a threaded environment.

For this to work, if you link libraries with -lctemplate you may also need to add -pthread (or, on some systems, -pthreads, and on others, -lpthread) to get the library to compile. If you leave out the -pthread, you'll see errors like this:

symbol lookup error: /usr/local/lib/libctemplate.so.0: undefined symbol: pthread_rwlock_init

If your code isn't multi-threaded, you can instead use the ctemplate_nothread library: -lctemplate_nothreads

To summarize, there are two ways to link in ctemlpate in non-threaded applications. For instance:

  1. Thread safe build:gcc -o my_app my_app.o -lctemplate -pthread

  2. Unthreaded code:gcc -o my_app my_app.o -lctemplate_nothreads

If your application uses threads, you should use form (1).

ctemplate's People

Contributors

dragotin avatar olafvdspek avatar

Stargazers

Wei Xu avatar

Watchers

James Cloos avatar Wei Xu avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.