"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "cfitsio/README.win32" of archive cfitsio3100.tar.gz:


As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
    1 To build the CFITSIO dll library using Visual C++:
    2 
    3 	Execute the vcvars32.bat file that is distributed with Visual C++
    4 
    5 	Unpack the CFITSIO source files (cfit2xxx.zip) into temporary directory
    6 
    7 	In a dos command window, cd to that directory and enter the 
    8         following commands:
    9 
   10 		nmake winDumpExts.mak
   11 		nmake makefile.vcc
   12 			(ignore the compiler warning messages)
   13 
   14 	This creates the cfitsio.def, cfitsio.dll, and cfitsio.lib files.  The
   15 	fitsio.h and longnam.h files are also needed to compile any programs
   16 	that use CFITSIO.
   17 
   18 	To test that the library works correctly, enter:
   19 		cl /MD testprog.c cfitsio.lib
   20 		testprog.exe
   21 
   22 	The testprog program prints out a long list of diagnostic messages
   23 	that should end with "Status = 0; OK - no error"
   24 
   25 
   26 To build a program using the CFITSIO dll:
   27 
   28 	Include the header files fitsio.h and longnam.h in your source code
   29 
   30 	Link your program using the .lib file
   31 
   32 
   33 To build the test program using Microsoft Visual C++:
   34 
   35 	cl /MD testprog.c cfitsio.lib
   36 
   37 To build the test program using Borland C:
   38 
   39 	bcc32 -f testprog.c cfitsio.lib
   40 
   41 NOTE: The /MD command line switch must be specified on the cl command line
   42 to force the compiler/linker to use the appropriete runtime library.  
   43 If this switch is omitted, then the fits_report_error function in CFITSIO
   44 will likely crash.  
   45 
   46 When building programs in the Visual Studio environment, one can force
   47 the equivalent of the /MD switch by selecting 'Settings...' under the
   48 'Project' menu, then click on the C/C++ tab and select the 'Code
   49 Generator' category.  Then under 'User Run-time Library' select
   50 'Multithreaded DLL'.