#error 전처리문으로 에러 발생 도와주세용~

hernian의 이미지

안녕하세요 Kisa에서 제공한 SHA-256 해쉬 알고리즘을 사용하기위하여
Ubuntu Test system 에서 컴파일하여 실행하면
계속해서 #error 로 빠집니다. 이유를 모르겠어요

아래는 Source 입니다.

/**
@file KISA_SHA_256.h
@brief SHA256 ¾ÏÈ£ ¾Ë°í¸®Áò
@author Copyright (c) 2013 by KISA
@remarks <a href="http://seed.kisa.or.kr/
*/
 
#ifndef" rel="nofollow">http://seed.kisa.or.kr/
*/
 
#ifndef</a> SHA256_H
#define SHA256_H
 
#ifdef  __cplusplus
extern "C" {
#endif
 
#ifndef OUT
#define OUT
#endif
 
#ifndef IN
#define IN
#endif
 
#ifndef INOUT
#define INOUT
#endif
 
#undef BIG_ENDIAN
#undef LITTLE_ENDIAN
 
#if defined(USER_BIG_ENDIAN)
    #define BIG_ENDIAN
#elif defined(USER_LITTLE_ENDIAN)
    #define LITTLE_ENDIAN
#else
    #if 0
        #define BIG_ENDIAN
    #elif defined(_MSC_VER)
        #define LITTLE_ENDIAN
    #else
        #error
    #endif
#endif

위의 마지막 #if 0 의 #else로 빠져서 #error 이 발생합니다.
원인은 몇몇 값들이 define 되지 않은것 같은데
어떻게하면 해결이 가능할까요?

익명 사용자의 이미지

Ubuntu 환경은 MSC가 아니니 당연히 error로 빠지겠죠.