Version 9 (modified by 17 years ago) (diff) | ,
---|
This is a draft and not yet fully supported.
HOWTO build Rave with Visual Studio
This HOWTO desribes the minimum-effort approach for building Rave using Visual Studio 2005 Professional. Later this will be tested and if necessary adapted for use with the free Express version of Visual Studio also.
Prerequisites
- A working installation of Visual Studio 2005 with C++ support
- (optional) For the Java bindings you will need a working installation of a JDK
Preparation
Rave has two principal dependencies: Boost and CLHEP.
Boost can be obtained in various ways. For Windows users the most convenient way is perhaps to use a setup program.
- Download and install the boost setup package from http://www.boost-consulting.com/products/free
- Set the BOOST_PATH environment variable to the chosen installation directory. (There has to be a
boost/math
subdirectory at the location given by BOOST_PATH.)
The same counts for CLHEP as well. It is released as source package as well es precompiled binaries. At the moment however there are no appropriate binaries for use with the latest generation of Microsoft compilers. Therefore users must compile the libraries on their own, which is straightforward, but involves the use of Cygwin. To circumvent the necessity of installing the otherwise unnecessary Cygwin environment, we will provide a precompiled package of the current version of CLHEP.
- Download and unpack the CLHEP binary package from our download site: CLHEP 2.0.3.2 VC8 DLL.zip
- Set the CLHEP_PATH environment variable to the destination chosen during unpacking. (There has to be an
include/CLHEP/Vector
subdirectory at the given location.)
For the Java bindings to compile, the JDK installation path has to be published by an environment veriable as well. Recent JDK packages don't do this automatically.
- Set the JAVA_HOME environment veriable to the base directory of a JDK. (There has to be an
include
and aninclude/win32
subdirectory at that location)
The generation of the Java interface classes is done by SWIG.
- Download the current swigwin package from http://www.swig.org/download.html and unpack it.
- Set the PATH environment variable to include the path to your SWIG installation directory.
If you face problems during later stages please make sure, that those three environment veriables (BOOST_PATH, CLHEP_PATH, JAVA_HOME) are set and accessible to the Visual Studio instance. Open up a command line windows and check if swig is in the PATH by calling swig -version
and checking if the installed SWIG version is echoed correctly.
Download Rave
The easiest way to get the Rave sources is certainly to download a packaged source archive. Since Rave is under heavy development at the moment of this writing, I can only suggest to grab the latest snapshot.
- Go to http://projects.hepforge.org/rave/trac/browser/trunk , scroll down and select "Zip Archive" as download format.
- Unpack the snapshot to a directory of your choice.
Build Rave
- Double-click the Visual Studio solution called
Rave.sln
Depending on whether you want to use Rave in a Java framework or in a C++ application, different configurations are available. They are built in seperate directories which allows to build each of them and use them in both ways. The default described here targets the Java bindings.
- Select the release configuration and press F7
After the build process has finished, you will find (along with many others) the two target files in the release subdirectory. The Rave.dll
contains the implementation of the Rave library while the Rave.jar
located in release/java
packages the corresponding interfaces for use in a Java application.
Deploy Rave
Since both CLHEP and Rave are by default linked dynamically against the MSVC runtime library, it has to be deployed along with the Rave.dll
. The necessary file can be found in the VC\redist\x86\Microsoft.VC80.CRT
subdirectory of your Visual Studio installation and is called msvcr80.dll
.
Attachments (1)
- 1.jpg (3.8 KB) - added by 16 years ago.
Download all attachments as: .zip