Top Diff List Source Search Help RSS Login

CFITSIO コンパイル時の注意点

CFITSIO コンパイル時の注意点

[多波長解析システム全体(サーバ、WS),解析サーバ(anam*、anah*),端末ワークステーション(alws*、sbws*)]
 CFITSIO を利用したコンパイルに失敗する場合があります。

(例)compress_fits
 URL: http://heasarc.gsfc.nasa.gov/docs/software/fitsio/cexamples.html

 =====
 cc -I/usr/local/include -L/usr/local/lib -o compress_fits
 compress_fits.c -lcfitsio -lm
 /var/tmp/ccSFbWKg.o: In function `main':
 compress_fits.c:(.text+0x489): undefined reference to `fits_comp_img'
 collect2: ld returned 1 exit status
 =====

 これは、fits_compress_img という関数が、2011年4月27日から
 使用されなくなったことが原因です。
 fits_img_compressという関数が同等の機能を持ちますので、
 本システムでは、そちらを使用する必要があります。


 [imcompress.c より抜粋]
 /*--------------------------------------------------------------------------*/
 int fits_compress_img_OBSOLETE(
     fitsfile *infptr, /* pointer to image tobe compressed */
     fitsfile *outfptr, /* empty HDU for output compressed image */
     int compress_type, /* compression type code */
                 /* RICE_1, HCOMPRESS_1, etc. */
     long *intilesize, /* size in each dimension of the tiles */
                 /* NULL pointer means tile by rows */
         int blocksize, /* compression parameter: blocksize */
         int nbits, /* compression parameter: nbits */
         int *status) /* IO - error status */

 /*
  !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
  This routine is obsolete and should not be used. The
  ftools 'fimgzip' task used to call this routine (but that task has been deleted);

  The name of the routine was changed 4/27/2011, to see if anyone complains.
  If not, then this routine should be deleted from the source code.
  !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!

  This routine initializes the output table, copies all the keywords,
  and loops through the input image, compressing the data and
  writing the compressed tiles to the output table.
 */