0

C アプリケーションに参照を追加する際に問題が発生しました。データ圧縮プロジェクトで「libiconv」へのリンカ参照を追加できません。「libiconv」ライブラリをダウンロードしましたが、コンパイルでエラーを示す参照を追加する際に混乱します。圧縮アプリの開発に Dev C++ を使用しています。

コンパイルログは次のとおりです。

Makefile のビルド: "C:\Dev-Cpp\Examples\eottest\Makefile.win"

Executing  make...

make.exe -f "C:\Dev-Cpp\Examples\eottest\Makefile.win" all

gcc.exe eot.o libeot.o properties.o  -o "Project1.exe" -L"C:/Dev-Cpp/lib" 


libeot.o(.text+0x19):libeot.c: undefined reference to `libiconv_open'
libeot.o(.text+0x36):libeot.c: undefined reference to `libiconv_close'
libeot.o(.text+0x67):libeot.c: undefined reference to `libiconv'

collect2: ld returned 1 exit status`
4

1 に答える 1

3

リンクする実際のライブラリではなく、追加のライブラリパスを指定しているだけです。試す:

gcc.exe eot.o libeot.o properties.o  -o "Project1.exe" -L"C:/Dev-Cpp/lib" -liconv
于 2010-11-28T10:25:43.380 に答える