[svn-r13951] Purpose: Update Windows documentation

Description:
Explain why Fortran isn't supported on MinGW and give users an "unsupported" alternative.  Also re-worked the main documentation to clarify using the HDF5 DLL libraries.

Tested:
None needed.
This commit is contained in:
Scott Wegner 2007-07-06 09:12:35 -05:00
parent e3966680ef
commit 625e2f5047
2 changed files with 102 additions and 121 deletions

View File

@ -20,20 +20,18 @@ Preconditions:
gcc-3.4.2 is included in MinGW, which includes: gcc-3.4.2 is included in MinGW, which includes:
gcc : GNU C compiler gcc : GNU C compiler
gcc-g++: GNU C++ compiler gcc-g++: GNU C++ compiler
gcc-g77: GNU Fortran 77 compiler
2.2 Using Compilers Not Supported 2.2 Using Compilers Not Supported
The compilers in 2.1 and 2.2 are supported and tested by HDF The compilers in 2.1 are supported and tested by The HDF
group. Any other compilers may still work but they are not Group. Any other compilers may still work but they are not
guaranteed by HDF group. guaranteed by HDF group.
If users want to use other compilers except those in 2.1 and 2.2, If users want to use other compilers except those in 2.1,
try to set the following variables to override the default try to set the following variables to override the default
choices. choices.
CXX : C++ compiler command CXX : C++ compiler command
3. HDF5 Dependencies 3. HDF5 Dependencies
@ -127,7 +125,15 @@ Build HDF5 on MinGW
Therefore, each configuration must incude the parameter Therefore, each configuration must incude the parameter
"--disable-stream-vfd". "--disable-stream-vfd".
2) Building Fortran libraries is also currently unsupported. 2) Building Fortran libraries is also currently unsupported. This is
because the current release of gcc for mingw (3.4.5) is not compatible
with the current g95 for mingw (g95 0.91!, gcc version 4.0.3).
However, if you would like to build gcc 4.x on your own, there are
instructions for doing so here:
http://www.mingw.org/MinGWiki/index.php/How%20to%20Compile%20GCC%204.1
Remember that this is UNSUPPORTED, and any Fortran binaries build
should be considered experimental.
4) Shared libraries can not be built on MinGW in release 1.8.0. 4) Shared libraries can not be built on MinGW in release 1.8.0.
@ -187,7 +193,7 @@ Build HDF5 on MinGW
example, if users want to configure HDF5 C/C++ example, if users want to configure HDF5 C/C++
library, with zlib library at /c/usr/, and library, with zlib library at /c/usr/, and
install HDF5 into directory /c/hdf5 using install HDF5 into directory /c/hdf5 using
gcc/g++ as C/C++ compiler and g95 as Fortran compiler: gcc/g++ as C/C++ compiler:
$ ./configure $ ./configure
--with-zlib=/c/usr/include,/c/usr/lib --with-zlib=/c/usr/include,/c/usr/lib

View File

@ -939,115 +939,128 @@ Waring: The instructions below will only describe how to build an application
version of the HDF5 library or DLL, you need to substitute the release version of the HDF5 library or DLL, you need to substitute the release
version of the HDF5 library or DLL with the debug version. version of the HDF5 library or DLL with the debug version.
To use HDF5 static library
To build an application that uses the HDF5 static library the following
locations will need to be specified for locating header files and linking with
the HDF static library, for example:
To build an application that uses the HDF5 static library the following c:\MyHDFstuff\hdf5\hdf5lib\release\include
locations will need to be specified for locating header files and linking with c:\MyHDFstuff\hdf5\hdf5lib\release\lib
the HDF static library, for example:
c:\MyHDFstuff\hdf5\hdf5lib\release\include If you have installed HDF5 library in Section II, step 3.
c:\MyHDFstuff\hdf5\hdf5lib\release\lib
If you have installed HDF5 library in Section II, step 3. We assume that you will use Zlib and Szip compression with HDF5 library.
We assume that you will use Zlib and Szip compression with HDF5 library. 1. Specifying Include Directories
1. Specifying Include Directories To specify the include directories in the settings for your Visual Studio
project, you may choose one of the following two methods.
To specify the include directories in the settings for your Visual Studio
project, you may choose one of the following two methods.
Method One: Project-wide Settings Method One: Project-wide Settings
1. Open your project in Microsoft Visual Studio and make sure it is the 1. Open your project in Microsoft Visual Studio and make sure it is the
active project. active project.
2. Go to the Project menu and chose the "Properties" option. 2. Go to the Project menu and chose the "Properties" option.
3. Choose the build configuration you would like to modify in the drop 3. Choose the build configuration you would like to modify in the drop
down menu labeled "Configuration:" down menu labeled "Configuration:"
4. Choose the "C/C++" tab, anc select "General". 4. Choose the "C/C++" tab, anc select "General".
5. In a text-area labeled with "Additional Include Directories:", add 5. In a text-area labeled with "Additional Include Directories:", add
HDF5, Zlib, and Szip header files directories. For example: HDF5, Zlib, and Szip header files directories. For example:
c:\MyHDFstuff\hdf5\hdf5lib\release\include c:\MyHDFstuff\hdf5\hdf5lib\release\include
c:\zlib123\include c:\zlib123\include
c:\szip\include c:\szip\include
Then click OK. Then click OK.
6. (Optional) To use HDF5 Fortran static library, the location of 6. (Optional) To use HDF5 Fortran static library, the location of
Fortran module files should be specified by following Project-> Fortran module files should be specified by following Project->
Settings->Fortran->Preprocessor, and in the text-area labeled Settings->Fortran->Preprocessor, and in the text-area labeled
"Additional Include Directories", add HDF5 Fortran module files "Additional Include Directories", add HDF5 Fortran module files
directories. For example: directories. For example:
c:\MyHDFstuff\hdf5\hdf5lib\release\include c:\MyHDFstuff\hdf5\hdf5lib\release\include
Method Two: Visual Studio Settings Method Two: Visual Studio Settings
1. In Visual STudio, go to Tools->Options->Projects-> 1. In Visual STudio, go to Tools->Options->Projects->
VC++ Directories. VC++ Directories.
2. Insert the correct HDF5, Zlib, Szip paths for both headers(include) 2. Insert the correct HDF5, Zlib, Szip paths for both headers(include)
and libraries. For example, and libraries. For example,
c:\MyHDFstuff\hdf5\hdf5lib\release\include c:\MyHDFstuff\hdf5\hdf5lib\release\include
c:\MyHDFstuff\hdf5\hdf5lib\release\lib c:\MyHDFstuff\hdf5\hdf5lib\release\lib
c:\zlib123\include c:\zlib123\include
c:\zlib123\lib c:\zlib123\lib
c:\szip\include c:\szip\include
c:\szip\dll c:\szip\dll
3. Go to the Project menu and choose the "Settings" option. 3. Go to the Project menu and choose the "Settings" option.
2. Specifying Linking Directories 2. Specifying Linking Directories
To link the HDF5 static library with your application: To link the HDF5 static library with your application:
1. In Visual Studio, go to the Project menu and choose "Properties". 1. In Visual Studio, go to the Project menu and choose "Properties".
2. Find the "Link" option and "Input" category. In the "Additional 2. Find the "Link" option and "Input" category. In the "Additional
Dependencies" field, insert "zdll.lib, szlibdll.lib, hdf5.lib". Dependencies" field, insert "zdll.lib, szlibdll.lib, hdf5.lib".
3. (Optional) Also insert "hdf5_cpp.lib" if you want to use HDF5 C++ 3. (Optional) Also insert "hdf5_cpp.lib" if you want to use HDF5 C++
static library. static library.
4. (Optional) Also insert "hdf5_fortran.lib" if you want to use HDF5 4. (Optional) Also insert "hdf5_fortran.lib" if you want to use HDF5
Fortran static library. Fortran static library.
5. (Optional) Also insert "hdf5_hl.lib" if you want to use HDF5 high 5. (Optional) Also insert "hdf5_hl.lib" if you want to use HDF5 high
level static library. level static library.
6. (Optional) Also insert "hdf5_hl_cpp.lib" if you want to use HDF5 High 6. (Optional) Also insert "hdf5_hl_cpp.lib" if you want to use HDF5 High
Level C++ static library. Level C++ static library.
7. (Optional) Also insert "hdf5_hl_fortran.lib" if you want to use HDF5 7. (Optional) Also insert "hdf5_hl_fortran.lib" if you want to use HDF5
High Level Fortran static library. High Level Fortran static library.
To link the HDF5 DLL library with your application: To link the HDF5 DLL library with your application:
1. Follow the steps for linking the HDF5 static library as shown above, 1. Follow the steps for linking the HDF5 static library as shown above,
except now link the export library that is created with the DLL. except now link the export library that is created with the DLL.
The export library is called hdf5dll.lib for HDF5 C libray, The export library is called hdf5dll.lib for HDF5 C libray,
hdf5_cppdll.lib for HDF5 C++ library, and hdf5_fortrandll.lib hdf5_cppdll.lib for HDF5 C++ library, and hdf5_fortrandll.lib
for HDF5 Fortran library. for HDF5 Fortran library.
2. In the Project Properties dialog, go to the C/C++ > Preprocessor
subsection. In the "Preprocessor Definitions" box, add "_HDF5USEDLL_"
to the list.
3. (Optional) Also add HDF5CPP_USEDLL to use HDF5 C++ DLL.
2. Place the DLL in a location that Windows will be able to locate. The 4. (Optional) Also add _HDF5USEHLDLL_ to use HDF5 high level DLL.
searched path and order for DLL's is
a) The directory where the executable module for the current 5. (Optional) Also add HDF5USE_HLCPPDLL use HDF5 high level C++ DLL.
process is located.
b) The current directory. 6. (Optional) Follow Project->Settings->Fortran->Category->General->
c} The Windows system directory. The GetSystemDirectory function Predefined Preprocess or Symbols, and add "HDF5F90_WINDOWS" to use HDF5
retrieves the path of this directory. Fortran DLL.
d) The Windows directory. The GetWindowsDirectory function
retrieves the path of this directory. 7. Place the DLLs in a location that Windows will be able to locate. The
e) The directories listed in the PATH environment variable. searched path and order for DLL's is
a) The directory where the executable module for the current
process is located.
b) The current directory.
c} The Windows system directory. The GetSystemDirectory function
retrieves the path of this directory.
d) The Windows directory. The GetWindowsDirectory function
retrieves the path of this directory.
e) The directories listed in the PATH environment variable.
======================================================================== ========================================================================
Section V: How to disable Gzip(Zlib)/Szip compression Section V: How to disable Gzip(Zlib)/Szip compression
@ -1941,44 +1954,6 @@ using the Visual C++ Development Environment.
Developer Studio project settings dialog. Developer Studio project settings dialog.
1.3 DLL... hints:
If you want to use DLL versions of HDF5 library in your application,
you should
1) Put HDF5 DLL into Windows system directory
2) add HDF5 DLL export library into your project
3) Follow "Settings... details" into the last line:
change Single-Threaded into Multithreaded DLL or
Debug Multithreaded DLL
4) Follow "Settings.. details" into PreProcessor:
Project
Settings
C/C++
Category
PreProcessor
Find PreProcessor definations and Add _HDF5USEDLL_ at the
end of the PreProcessor definitions to use HDF5 C DLL.
5)(optional) repeat 4), add HDF5CPP_USEDLL at the
end of the PreProcessor definitions to use HDF5 C++ DLL.
6) (optional) repeat 4), add _HDF5USEHLDLL_ at the
end of the PreProcessor definitions to use HDF5 high level
DLL.
7) (optional) repeat 4), add HDF5USE_HLCPPDLL at the
end of the PreProcessor definitions to use HDF5 high level C++
DLL.
8) (optional) Follow Project->Settings->Fortran->Category->
General->Predefined Preprocess or Symbols, and add
"HDF5F90_WINDOWS" to use HDF5 Fortran DLL.
2. Backward compatibility with 1.6 2. Backward compatibility with 1.6
If you are going to use 1.6 APIs with 1.8 branch, you may do the If you are going to use 1.6 APIs with 1.8 branch, you may do the
following two things: following two things: