Generating Your Own Wrapper

Currently only generating a wrapper from a ROOT distribution is supported. So, if you have some extra objects you've put into a TTree, generation isn't support. Clearly a shortcoming.

To test that the generation works, I setup a machine as follows. I'm sure other versions of the OS/tools would also work, but this is what I tested on:

  1. Windows Vista, Business edition.
  2. Visual C++/Visual Studio 2005, Professional. I'm pretty sure the free Express editions won't work for this (though you should be able to use the wrappers there just fine). However, I've not tested - it could work!
  3. All updates from Windows Update (which includes some for VS2005).

For CVS access I used Tortoisecvs (version 1.8.31). However, if you want you can just grab the ZIP file of the download and use that instead (see below). For versions prior to v1.1, see the older instructions.

Do the following to build a new version of the wrapper.

  1. Download and install ROOT. For this test I did 5.16/00, a stable production release. I used the VC++ 8.0 version (you have to match versions that ROOT was built with!!). I downloaded the tar file.
  2. Download the Wrapper and Wrapper Generators modules of ROOT.NET
  3. Start a Visual Studio 2005 Command Prompt -- this can be found in the MSVC 2005 -> Tools menu under the Start menu.
  4. cd to the Wrapper Generators directory.
  5. Enter the following command to build everything:

    DoEverythingAtOnce\BuildROOTWrappers %ROOTSYS% rootout

    You can replace %ROOTSYS% with the directory where ROOT is installed if you like. rootout will be the name of the subdirectory under the Wrappers directory where you can find the result.

  6. Copy the files from the new Wrappers/rootout/release directory over to where you'd like to keep the .NET wrapper library. Everything else can now be deleted!