⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 install.texi

📁 A C++ class library for scientific computing
💻 TEXI
字号:
@node install@section Installation and porting@subsection Installation@cindex installation@cindex autoconf @cindex makefilesBlitz++ uses @acronym{GNU} Autoconf, which handles rewriting Makefiles forvarious platforms and compilers.  It has greatly simplified installation andporting.  Many thanks to John W. Eaton and Brendan Kehoe for their helpwith this.To install blitz, unpack the @file{blitz-VERSION.tar.gz} file (it willinstall into a subdirectory @file{blitz-VERSION}).  For example:@example[tveldhui@@n2001:~] 32: ls -l blitz*.gz-rw-r--r--   1 tveldhui users      480953 Jun 23 15:20 blitz-0.5.tar.gz[tveldhui@@n2001:~] 33: gunzip blitz-0.5.tar.gz [tveldhui@@n2001:~] 34: tar xvf blitz-0.5.tarblitz-0.5/CHANGELOGblitz-0.5/COPYINGblitz-0.5/INSTALLblitz-0.5/Makefile.inblitz-0.5/READMEblitz-0.5/THANKS  .  .@end exampleThen go into the @file{blitz-VERSION} directory, and type:@cindex configure script@example./configure CXX=[compiler]@end examplewhere [compiler] is one of @code{xlc++}, @code{icpc}, @code{pathCC}, @code{xlC}, @code{cxx}, @code{aCC}, @code{CC}, @code{g++}, @code{KCC}, @code{pgCC} or @code{FCC}.  (If you do not choose a C++ compiler, theconfigure script will attempt to find an appropriate compiler for thecurrent platform.)By default, the configure script will use a particular set of optionswith each C++ compiler.  You can disable these default settings and thensubstitute your own preferred compiler options with the CXXFLAGS variable,using this syntax:@example./configure CXX=g++ --disable-cxx-flags-preset CXXFLAGS="-ftemplate-depth-50"@end exampleIf you are interested in benchmarking, you may want to use the option@code{--with-blas=...} to specify the path where the blas library is found.Run the configure script with the option @code{--help} to see all the available options.Once the configure script is done, you can do any of these things:@table @code@item make libCheck the compiler and create @file{libblitz.a}.@item make check-testsuiteMake the blitz library plus build and run the testsuite.@item make check-examplesMake the blitz library plus build and run the examples.@item make check-benchmarksMake the blitz library plus build and run the benchmarks.@item make allDo all of the above.  This may take a @strong{long} time.@item make installBuild the blitz library and documentation and install, along with theblitz header files, in prefix directory.@end tableBuilding the benchmark programs requires both a Fortran 77 and Fortran 90compiler.@subsection The Blitz++ directory treeThe main Blitz++ directory contains these subdirectories:@table @code@item blitzBlitz++ headers and source code files@item randomRandom number generators@item srcSource code for @file{libblitz.a}@item libLocation of @file{libblitz.a}@item docDocumentation in HTML and PostScript@item testsuiteTestsuite programs@item examplesExample programs@item benchmarksBenchmark programs@end table@subsection Porting Blitz++@cindex porting Blitz++If you want to try porting Blitz++ to a new compiler or platform, I suggestthe following approach:@itemize @bullet@item  First check the Blitz++ web page to make sure you have the latestsnapshot, and that someone hasn't already ported blitz to your platform.@item  Install autoconf (from e.g.@: @url{ftp://prep.ai.mit.edu/pub/gnu}) ifyou don't have it already.@item  Run the configure script with CXX=[compiler].  Thiswill exercise your compiler to see what language features it supports.  Ifit doesn't have member templates and enum computations, just give up.  Youmay need to set CXXFLAGS to use compiler options that enable some languagefeatures.@item  Once you know what compiler options are needed, you can make thesethe default settings for your C++ compiler.  Make a backup of @file{m4/ac_cxx_flags_preset.m4}, and then edit the file to add anappropriate case for your compiler.  Invoke autoconf to regenerate theconfigure script.  Then try configure with your new preset flags.@end itemize

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -