重複エラー: #error "のみ直接含めることができます。 」

重複エラー: #error

著者帰属圧縮距離の研究をしました。圧縮プログラム「Complearn」を職場で使用する必要があります。しかし、最初はプログラムのインストールに問題がありました。

1)このリンクからLinux Mintにプログラムをダウンロードしました(私のWindowsコンピュータの仮想マシン(VirtualBoxのVM)にあります)。

http://www.complearn.org/downloads/libcomplearn-1.1.7.ta​​r.gz

2) プログラムターミナルウィンドウ(もちろんプログラムディレクトリ)に一つずつ作成し、

./configure

(設定ステップの後、gsl、zlibなどの必須の依存関係に関するいくつかのエラーが発生しました。これらのエラーはすべてインストールしました。は次のとおりです。

    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検索でこのエラーを修正するための提案が見つかりませんでした。

ありがとうございます。

ベストアンサー1

おすすめ記事