JPEG parameter struct mismatch: library thinks size is 520, caller expects 464

라이브러리를 겨우겨우 컴파일 해서 돌려봐야지~ 룬루랄라 하고 돌렸더니
저따구 에러가 발생을 한다.. 닝기리

아무튼 해결 방법은
typedef 로 묶인 기본 타입들에 대한 정의를 수정해 주면 된다는 것이다.

일단 가장 큰 차이는 boolean의 크기가 다르다는 것이고,
나머지 타입들은 시스템에 따라 미묘하게 다를수 있으니 현재 사용하는 시스템의 타입으로 변경해주면 된다.

/* These typedefs are used for various table entries and so forth.
 * They must be at least as wide as specified; but making them too big
 * won't cost a huge amount of memory, so we don't provide special
 * extraction code like we did for JSAMPLE.  (In other words, these
 * typedefs live at a different point on the speed/space tradeoff curve.)

/* UINT8 must hold at least the values 0..255. */

typedef unsigned char UINT8;
#else /* not HAVE_UNSIGNED_CHAR */
typedef char UINT8;
#else /* not CHAR_IS_UNSIGNED */
typedef short UINT8;
#endif /* CHAR_IS_UNSIGNED */

/* UINT16 must hold at least the values 0..65535. */

typedef unsigned short UINT16;
#else /* not HAVE_UNSIGNED_SHORT */
typedef unsigned int UINT16;

/* INT16 must hold at least the values -32768..32767. */

#ifndef XMD_H			/* X11/xmd.h correctly defines INT16 */
typedef short INT16;

/* INT32 must hold at least signed 32-bit values. */

#ifndef XMD_H			/* X11/xmd.h correctly defines INT32 */
typedef long INT32;

 * On a few systems, type boolean and/or its values FALSE, TRUE may appear
 * in standard header files.  Or you may have conflicts with application-
 * specific header files that you want to include together with these files.
 * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.

typedef int boolean;

Posted by 구차니

댓글을 달아 주세요