rave is hosted by Hepforge, IPPP Durham
close Warning: Can't synchronize with repository "(default)" (/hepforge/svn/rave does not appear to be a Subversion repository.). Look in the Trac log for more information.

This is a draft


HOWTO build CLHEP with Visual Studio 2005

CLHEP is officially documented to build with VC7.1 but the switch to VC8 requires a little know-how to get the build steps right. This is because the VC8 compiler has a few features namely to prevent misuse or errorprone use of iterators, which render the CLHEP unusable.

Prerequisites

To successfully compile CLHEP you will need

  • A working istallation of Visual Studio 2005
  • A CYGWIN setup including autoconf, automake, make and tar packages

Prepare the build environment

To provide the CLHEP build scripts with the necessary information, insert the following line just before the bash --login -i line in the Cygwin.bat file found in the base directory of your CYGWIN installation:

call "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"

Create an installation directory for the CLHEP libraries. I suggest to use C:\clhep and the following steps will rely on this choice.

Download CLHEP

  • Download the latest source package from http://proj-clhep.web.cern.ch/proj-clhep/
  • Move the downloaded file into your CYGWIN var/tmp directory usually located at C:\cygwin\var\tmp
  • Enter the CYGWIN environment (by double-clicking the Cygwin symbol on your desktop)

Unpack, configure and build CLHEP

The following steps will build a debug and a release version of the CLHEP library.

Execute the following commands:

  • mkdir clhep; cd clhep
  • tar xzf /var/tmp/clhep-*-src.tgz
  • cd *; cd CLHEP
  • mkdir debug; cd debug
  • ../configure --prefix=/cygdrive/c/clhep/debug
  • make AM_CXXFLAGS="-Ehsc -nologo -GR -MDd -ZI -D_HAS_ITERATOR_DEBUGGING=0 -D_SECURE_SCL=0"
  • make install
  • cd ..; mkdir release; cd release
  • ../configure --prefix=/cygdrive/c/clhep
  • make AM_CXXFLAGS="-Ehsc -nologo -GR -MD -D_HAS_ITERATOR_DEBUGGING=0 -D_SECURE_SCL=0"
  • make install

If in the previous steps you have chosen an installation directory other than C:\clhep, please change the --prefix= parameters accordingly.

You now have a ready-to-rock version of CLHEP installed on your system and are ready to proceed with building Rave and of course you can skip the step of downloading the precompiled CLHEP package.

Last modified 17 years ago Last modified on Nov 8, 2007, 1:30:57 PM