Libparticle - building instructions

Build Requirements

Build libparticle with C language support

  1. Unpack the libparticle.
  2. change to the directory you unpacked to and run 'scons lang='
  3. a build-* directory was created and the c libparticle is there.

Running the Tests

The Test are run whenever some source files changed. If you want to run the test anyway type "scons test".

Build libparticle with Java, Ruby, C# and/or PHP language support

These are generals steps to build a wrapper, depending on your environment you have to tweak some settings. We currently provide build scripts for the following languages: Java, Ruby, C# and PHP. To select the Language you want to build for you have to set the lang= parameter to scons. If something goes wrong you might consider mailing to particle@teco.edu or see the language Notes at SWIG Documentation.

Additional Build Requirements

Example build

Here's an exmaple on how to build the Java and Ruby Wrapper in one step:

  1. Unpack the libparticle.
  2. Be sure that the JAVA_HOME environment variable points to the location oy your installed sdk.
    1. for linux do 'set | grep JAVA_HOME'
    2. on windows use 'set' and look for JAVA_HOME
  3. change to the directory you unpacked to and run 'scons lang=Java,Ruby'
  4. The libraries are created in build-*/libparticleJava and build-*/libparticleRuby
  5. if it didn't work (like missing header) run scons lang=Java,Ruby -h and you will be presented something like this:
    Checking for C header file libparticle.h... (cached) yes
    Checking for C header file ruby.h... (cached) yes
    scons: done reading SConscript files.
    
    debug: set to 1 to build with debbuging symbols. (yes|no)
        default: 0
        actual: 0
    
    lang: the language the wrapper should be build  for
        (all|none|comma-separated list of names)
        allowed names: Java Php Ruby Csharp
        default: Java
        actual: Java Ruby
    
    libparticle_dir: the root of a libparticle distribution ( /path/to/libparticle_dir )
        default: libparticle/
        actual: libparticle/
    
    ruby_include: where ruby.h is located ( /path/to/ruby_include )
        default: /usr/lib/ruby/1.8/i686-linux/
        actual: /usr/lib/ruby/1.8/i686-linux/
    
    Use scons -H for help about command-line options.
    

which informs you for example to set ruby_include to the path where ruby.h can be found.

Windows

Add the python directory to your PATH environment variable.

For building the Java wrapper be sure to have set the JAVA_HOME environment variable.

Unix

For building the Java wrapper be sure to have set the JAVA_HOME environment variable.

OS X

OS X is partially supported. See this Thread in our forum.