-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.win32
72 lines (46 loc) · 2.64 KB
/
README.win32
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
Instructions on using CFITSIO on Windows platforms for C programmers
These instructions use a simple DOS-style command window. It is also possible
to build and use CFITSIO within a GUI programming environment such as Visual
Studio, but this is not supported here.
===============================================================================
1. Build the CFITSIO dll library
This step will create the cfitsio.def, cfitsio.dll, and cfitsio.lib files.
(If you downloaded the CFITSIO .zip file that contains the pre-built binary
.dll file, then SKIP THIS STEP).
A. With Microsoft Visual C++:
1. Execute the vcvars32.bat file that is distributed with Visual C++
2. Unpack the CFITSIO source files (cfitxxxx.zip) into temporary directory
3. In a dos command window, cd to that directory and enter the
following commands:
nmake winDumpExts.mak
nmake makefile.vcc
(ignore the compiler warning messages)
B: With Borland C++:
First, follow the instructions provided by Borland to set up
the proper environment variables and configure files for the compiler.
Unpack the cfitsio.zip source file distribution into a suitable directory.
In a DOS command window, cd to that directory and then execute the
makepc.bat batch file on the command line to build the CFITSIO library,
and the testprog and cookbook sample programs.
===============================================================================
2. Test the CFITSIO library with Visual C++
Compile and link the testprog.c test program with this command:
cl /MD testprog.c cfitsio.lib
This will create the testprog.exe executable program. Running this
program should print out a long series of diagnostic messages
that should end with "Status = 0; OK - no error"
===============================================================================
3. Compile and link an application program that calls CFITSIO routines
with Visual C++
Include the fitsio.h and longnam.h header files in the C source code.
Link the program with the cfitsio.lib file:
cl /MD your_program.c cfitsio.lib
NOTE: The /MD command line switch must be specified on the cl
command line to force the compiler/linker to use the
appropriete runtime library. If this switch is omitted, then
the fits_report_error function in CFITSIO will likely crash.
When building programs in the Visual Studio environment, one
can force the equivalent of the /MD switch by selecting
'Settings...' under the 'Project' menu, then click on the C/C++
tab and select the 'Code Generator' category. Then under 'User
Run-time Library' select 'Multithreaded DLL'.