1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
|
COMPILING A PROGRAM:
-------------------
Following are instructions for compiling an application program on the
window xp using the hdfeos binaries that we provide or you build.
Make sure that you already have all of the following libraries before you
startto compile an application program: libjpeg.lib, zlib.lib (or zdll.lib),
szlib.lib, hdf5.lib, hdf5_hl.lib, hdfeos5.lib, hdf5_fortran.lib,
hdf5_hl_fortran.lib, gctp.lib.
NOTE: The current versions that we're using: jpeg6b, zlib1.2.5, szip2.1,
HDF5-1.8.5, HDFEOS5.1.13.
If you want to use the latest versions of jpeg, zlib and szlib,
go to The HDF Group website (http://www.hdfgroup.org/release4/obtain.html and
http://www.hdfgroup.org/HDF5/release/obtain5.html) to download.
C or Fortran program :
---------------------
Using Microsoft "Visual C++ version 9.x (orlater)" for C program:
Using Digitalt Visual Fortran version 9.x or later version for
==================== Using Microsoft Visual Studio 2008 =======================
Example: runing the hdfeos testdrivers:
Open Microsoft Visual Studio 2008 and create a project
(Visual C++ Project->Win32 Console Project). place a "testdriver" (for example
/hdfeos/testdrivers/swath/testswath.c) in the "Source Files" directory (in the
Solution Explorer Window) and the tutils.h in the "Haeder Files" directory of
the project. Choose "Release" or "Debug" for the configuration setting (using
Build->"Configuration Manager" or the one showing on the toolbar).
Click on project name in the project tree.
Select Project->Properties:
Select "General" under "Configuration Properties".
In the selection window for "Configuration Type" select
"Application(.exe)" option to create output as executable.
Select folder C/C++->Preprocesssor
Add the following to "Preprocessor definitions":
VISUAL_CPLUSPLUS, INTEL86, H5_USE_16_API (if you are using
HDF5-1.8.X this may be required to map a few depricated hdf5
functions to their new formats)
If the followings were not already there, then add them:
WIN32,_CONSOLE
For "Runtime Library" use "Multi-thread(/MT)"
For "precompiled Headers" choose
"Create Precompiled Headers(/yc)"
For "Advanced"->"Compile As" choose "Compile as C Code (/TC)"
Select "Linker" folder.
Under "General" chose "output File" and specify the exectable
and full path to it as "F:\MyHdfeos_bin\testswath.exe".
Under "Input" put the followings for the
"Additional Dependencies":
Swath & Point:
==============
wsock32.lib hdfeos5.lib hdf5_hl.lib hdf5.lib libjpeg.lib
zdll.lib szlib.lib
Grid
====
wsock32.lib hdfeos5.lib gctp.lib hdf5_hl.lib hdf5.lib
libjpeg.lib zdll.lib szlib.lib
The following libraries may (or may not) need to be included:
kernel32.lib user32.lib gdi32.lib winspool.lib comdig32.lib
advapi32lib shell32.lib ole32.lib oleaut32.lib uuid.lib
odbc32.lib odbccp32.lib
NOTE: hdfeos5.lib and gctp.lib are Release Versions.
hdfeos5d.lib and gctpd.lib are Debug versions.
Under "Advanced" type "main" for the "Entry Point"
This completes settings for "Linker". Click "Apply' then "OK" to
close Property setting window.
Select Tools->Options->Projects and Solutions->VC++ Directories->
"Show directories for"->"Include files", add the following directories:
$(VCInstallDir)include
$(VCInstallDir)atlmfc\include
$(WindowsSdkDir)\include
$(FrameworkSDKDir)include
F:<path to jpeg>\include
F:<path to zlib>\include
F:<path to szlib>\include
F:<path to HDF5>\include
F:<path to HDFEOS5>\include
Select Tools->Options->Projects and Solutions ->VC++Directories->
"Show directories for"->"Library files", add the following directories:
$(VCInstallDir)lib
$(VCInstallDir)atlmfc\lib
$(VCInstallDir)atlmfc\lib\i386
$(WindowsSdkDir)\lib
$(FrameworkSDKDir)lib
$(VSInstallDir)
$(VSInstallDir)lib
F:<path to jpeg>\lib
F:<path to zlib>\lib
F:<path to szlib>\lib
F:<path to HDF5>\lib
F:<path to HDFEOS5>\lib
Click "OK" to close "Options" window.
Select Build and then "Build <project name>".
To run the executable file, for example, testswath.exe
Open MS-Dos, go to ../testdrivers/swath and run testswath.exe.
NOTE: Before running testpoint.exe, you should copy all ".txt" files to release
folder.
|