hepmc - Blame information for rev 361

Subversion Repositories:
Rev:
Rev Author Line No. Line
293 garren 1 #-------------------------------------------------------------
298 garren 2 # running configure
3 #-------------------------------------------------------------
4  
361 garren 5 To avoid autotool confusion, we recommend running the bootstrap
6 in your cygwin environment before beginning the build.
7  
298 garren 8 To build for Windows Visual C++, configure with CXX=cl CC=cl.
9  
10 #-------------------------------------------------------------
321 garren 11 # setup the compiler for cygwin
293 garren 12 #-------------------------------------------------------------
292 garren 13  
286 garren 14 For the compilation under cygwin using VC++, you have to make sure that
15 the PATH contains the path to the installation of Visual Studio.
293 garren 16 The safest way to do this, is to add VC to your Cygwin.bat file.
286 garren 17 Since it is possible to have several different versions of VC on the same
293 garren 18 machine, we recommend keeping a generic Cygwin.bat and creating special
19 CygwinXXX.bat file for each compiler you want to use.
286 garren 20  
21 Here is an example for VC9:
22  
293 garren 23 @echo off
286 garren 24  
293 garren 25 @call "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat"
26 @set PATH=%PATH%;C:\cygwin\bin
292 garren 27  
293 garren 28 C:
29 chdir C:\cygwin\bin
292 garren 30  
293 garren 31 bash --login -i
292 garren 32  
293 garren 33 Two lines, "@call..." and "@set...", have been added to the default Cygwin.bat.
34  
35 #-------------------------------------------------------------
321 garren 36 # building executables
293 garren 37 #-------------------------------------------------------------
38  
321 garren 39 When building your own exectuables, we recommend using the Visual C++ command
40 shell, found under All Programs -> Visual C++ XXX -> Visual Studio Tools,
41 which will have the Visual C++ environment properly established.
42 You will need to use the same compiler flags as used by configure.ac.
293 garren 43  
321 garren 44 Compile an object file:
45 cl /EHsc /MD /GR /nologo /c \
46 /IC:\cygwin\home\garren\lcg\hepmc\config\vc9\include \
47 example_UsingIterators.cc
293 garren 48  
321 garren 49 Build an executable:
50 cl /Feexample.exe example_UsingIterators.obj \
51 C:\cygwin\home\garren\lcg\hepmc\config\vc9\lib\HepMC.lib
52  
293 garren 53 #-------------------------------------------------------------
54 # setting the path explicitly for VC 7.1
55 #-------------------------------------------------------------
56  
286 garren 57 For the compilation under cygwin using VC 7.1 (Version 13.10.3077)
58 you have to make sure that the PATH contains the path to the
293 garren 59 installation of Visual Studio .NET 2003. This example also adds
60 CLHEP to the path. CLHEP is not required, but you may need it for your
61 own purposes:
286 garren 62  
63 export VSPATH="/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003"
64  
65 export PATH="/cygdrive/c/WINNT/Microsoft.NET/Framework/v1.1.4322":${PATH}
66  
67 export PATH="${VSPATH}/SDK/v1.1/bin":${PATH}
68 export PATH="${VSPATH}/Common7/Tools/bin":${PATH}
69 export PATH="${VSPATH}/Common7/Tools/bin/prerelease":${PATH}
70 export PATH="${VSPATH}/Common7/Tools/":${PATH}
71  
72 export PATH="${VSPATH}/Vc7/bin":${PATH}
73 export PATH="${VSPATH}/Common7/IDE":${PATH}
74  
75 The compiler also needs the following variables set up (and
76 as these are interpreted by the compiler, they have to be in
77 "windows-syntax"):
78  
79 export INCLUDE="C:/cygwin/home/clhep/1.9.2.2/include;c:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/include;C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include"
80 export LIB="C:/cygwin/home/clhep/1.9.2.2/lib;c:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/lib;C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib"
81  
82 Notice that CLHEP needs to be defined in LIB and INCLUDE.
83 You may have to adapt to your installation path, if different.
84  
293 garren 85 #-------------------------------------------------------------
86 # trouble reports
87 #-------------------------------------------------------------
286 garren 88  
293 garren 89 Please report problems using the bug-tracker of the savannah portal at:
286 garren 90  
91 http://savannah.cern.ch/projects/hepmc/
92