중복 오류: #error "만직접 포함될 수 있습니다. "

중복 오류: #error "만직접 포함될 수 있습니다. "

저자 귀속 압축 거리에 대한 연구를 했습니다. 압축 프로그램인 "Complearn"을 직장에서 사용해야겠습니다. 하지만 처음에는 프로그램을 설치하는 데 문제가 있었습니다.

1) 이 링크에서 Linux Mint로 프로그램을 다운로드했습니다(내 Windows 컴퓨터의 가상 머신(VirtualBox의 VM)에 있음).

http://www.complearn.org/downloads/libcomplearn-1.1.7.tar.gz

2) 프로그램 터미널 창(물론 프로그램 디렉터리)에 하나씩 작성하고,

./configure

(구성 단계 후에 gsl, zlib 등과 같은 필수 종속성에 대한 몇 가지 오류가 발생했습니다. 이러한 오류를 모두 설치했습니다. 마침내 glib가 필요했습니다. 설치했지만 이전 버전의 glib가 존재한다는 또 다른 오류가 발생했습니다. 오류는 다음과 같습니다.

    checking for GLIB - version >= 2.0.0... 
*** 'pkg-config --modversion glib-2.0' returned 2.42.0, but GLIB (2.40.2)
*** was found! If pkg-config was correct, then it is best
*** to remove the old version of GLib. You may also be able to fix the error
*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
*** /etc/ld.so.conf. Make sure you have run ldconfig if that is
*** required on your system.
*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
*** to point to the correct configuration files
no
configure: error: must have glib >= 2.0.0 and gobject installed

저는 다음 명령으로 해결했습니다.

echo $LD_LIBRARY_PATH 내보내기 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

그 후 ./configure 단계를 시도했지만 실패하지 않았습니다. )

그 다음에

 make

다음 오류로 인해 실패합니다.

> In file included from anydecompress.c:32:0:
> /usr/local/include/glib-2.0/glib/garray.h:29:2: error: #error "Only <glib.h> can be included directly."
>   #error "Only <glib.h> can be included directly."
>   ^
> In file included from /usr/local/include/glib-2.0/glib/garray.h:32:0,
>                  from anydecompress.c:32:
> /usr/local/include/glib-2.0/glib/gtypes.h:29:2: error: #error "Only <glib.h> can be included directly."
>  #error "Only <glib.h> can be included directly."
>  ^
> In file included from /usr/local/lib/glib-2.0/include/glibconfig.h:9:0,
>                  from /usr/local/include/glib-2.0/glib/gtypes.h:32,
>                  from /usr/local/include/glib-2.0/glib/garray.h:32,
>                  from anydecompress.c:32:
> /usr/local/include/glib-2.0/glib/gmacros.h:33:2: error: #error "Only <glib.h> can be included directly."
>   #error "Only <glib.h> can be included directly."
>  ^ 
> In file included from /usr/local/include/glib-2.0/glib/gtypes.h:34:0,
>                  from /usr/local/include/glib-2.0/glib/garray.h:32,
>                  from anydecompress.c:32:
> /usr/local/include/glib-2.0/glib/gversionmacros.h:29:2: error: #error "Only <glib.h> can be included directly."
>  #error "Only <glib.h> can be included directly." 
>  ^ 
> anydecompress.c: In function ‘main’:
> anydecompress.c:59:3: warning: ‘g_type_init’ is deprecated (declared at /usr/local/include/glib-2.0/gobject/gtype.h:679) [-Wdeprecated-declarations]    
>  g_type_init ();   
> ^
> make[2]: *** [anydecompress-anydecompress.o] Error 1
> make[2]: Leaving directory `/home/kubra/libcomplearn-1.1.7/src' 
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/home/kubra/libcomplearn-1.1.7/src' 
> make: *** [all-recursive] Error 1

무슨 뜻이에요? 이 문제를 해결하려면 어떻게 해야 합니까? 저 좀 도와 주 시겠어요? Google 검색에서 이 오류 수정에 대한 제안을 찾지 못했습니다.

감사해요.

관련 정보