Installation

C++Script is available from http://calumgrant.net/cppscript.

Prerequisites

C++Script needs a C++ compiler such as GCC or Microsoft Visual C++.  On Linux or Cygwin, make sure you select the packages g++ and make from your package manager.  Microsoft Windows users can either use Visual C++, or download a GNU platform such as Cygwin.

Installation under GNU (Linux, Cygwin, MSYS etc)

C++Script uses the standard automake/autoconf build environment.

 

$ tar xzf cppscript-X.X.X.tar.gz
$ cd cppscript-n.nn
$ ./configure
$ make install

 

You can check that the library works properly by running "make check" to run the unit tests.

Validate the install

You should be able to run the cppscript program at the command prompt

$ cppscript -v

You can then run a script, such as hello_world.cpp

$ cd docs
$ cppscript hello_world.cpp

Installation under Windows

Your best approach is to use Cygwin.  Other UNIX-type platforms include MSYS, SUA and WSU.  Then just follow the GNU instructions above.

Microsoft Visual C++

C++Script works in standard C++, so can be used with Visual C++ in managed and unmanaged code.  Since Microsoft Windows doesn't have a C++ compiler, you must build projects in the Visual C++ IDE.

  1. Get Visual C++/Visual Studio version 9.0.  You can download the free Express edition of the compiler here.  
  2. Create a new solution, and choose either a Win32 or a CLR project.
  3. Download the zip version of the library and copy the directories libdynamic and script_main into your solution directory.
  4. Add the project files libdynamic.vcproj and script_main.proj to your solution.
  5. Set the project dependencies so that your project is dependent on the libdynamic and script_main projects. (Project/Project dependencies... menu item)
  6. Add the libdynamic directory to the include path of your project. (Project/Properties/Configuration Properties/C/C++/General/Additional Include Directories).

For some insane reason, Visual C++ projects are not compatible between different versions.  So the project files only work in Visual C++ 9.0.