gcc -fpic -c gd_wrap.c -Dbool=char -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE
:編譯SWIG的包裝器模塊輸出時出現6個錯誤?
In file included from /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/op.h:499,
from /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/perl.h:2754,
from gd_wrap.c:731:
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/reentr.h:612: error: field ‘_crypt_struct’ has incomplete type
In file included from /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/perl.h:3950,
from gd_wrap.c:731:
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/proto.h:297: error: expected declaration specifiers or ‘...’ before ‘off64_t’
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/proto.h:299: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Perl_do_sysseek’
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/proto.h:300: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Perl_do_tell’
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/proto.h:2009: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before Perl_PerlIO_tell’
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/proto.h:2010: error: expected declaration specifiers or ‘...’ before ‘off64_t’
任何人都熟悉這個錯誤?
我在CentOS 5.5
和Perl版本是5.8.8
怎麼樣'/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/reentr.h :612:錯誤:字段'_crypt_struct'具有不完整的類型? –
啊,爲此,只需定義「_GNU_SOURCE」放在編譯行「-D_GNU_SOURCE」 –
只是好奇,你怎麼能記住這一切? –