Installing CPP4Scripts

You may use the CPP4Scripts in two ways: all inclusive source file set or a library. There are of course benefits and disadvantages in both. We do not list them here since we assume you can easily figure them out.

To use the all-inclusive way, simply unpack the source files to your hard drive, use the 'c4s_all.hpp' include file in your source file, specify cpp4scripts install directory in your build command as include directory and that's it. You do not have to build or install the library but please take a look at the configuration section. Currently all inclusive set uses about 150k of space when compiled.

To use CPP4Scripts as library please copy and unpack the sources to a place where you can perform build. Then follow the instructions on this page.


Configuration is done with compiler defines. All defines are listed in 'c4s_config.hpp'. Take a look at the defines and choose the ones that are good to you. Simply comment the defines out from features you do not like to use.

Building and installing library

We have bit of a chicken-egg-problem when we build the library: We need a build-program to build. This is solved by compiling first builder that will do the actual building of the library. Builder needs to be created with environment specific commands.

In Linux you execute:

g++ -o builder builder.cpp -Wall -pthread -fexceptions -fno-rtti -fuse-cxa-atexit -O2

In Windows with Visual Studio you execute:

cl /Febuilder.exe /O2 /MT /EHsc /W2 builder.cpp Advapi32.lib

Now our job is much easier since we use the 'builder' to do the job. Same command and parameters work in both Linux and in Windows. Please use '-?' command to see the short help for builder. Here is a sample to build and install release version of the library:

  $ builder -r
  $ builder -r install [target]

In Linux the target would be '/usr' or '/usr/local'. In Windows the target is host specific.


We have reference manual created with Doxygen from the source code. We do not have it available on-line so you will have to download it from the SourceForge.


Samples directory has a sample file for most of the classes. Please refer to the samples to see the library in action. Samples were born from simple test programs and are still used to test new features. If they look like they are work in progress it is because they are.