Re: Perl includes and feature.h
On Wed, Sep 04, 2002 at 12:20:36AM +0200, Torsten Landschoff wrote:
>I am having a problem with Debian's perl 5.8. The following C source
>does not compile:
>
>#include <features.h>
>/usr/lib/perl/5.8.0/CORE/reentr.h:602: field `_crypt_struct' has incomplete type
>Removing the #include <features.h> fixes this problem. Now, I have a
>package that first includes <string.h>, which in turn includes the
>evil <features.h>. It used to build fine with 5.6.1, as does the above
>C source, but now that does not work anymore.
Make sure that you're using the correct CPPFLAGS, as set by
ExtUtils::MakeMaker or ExtUtils::Embed (or manually from the value of
$Config{cppflags}) to compile the code.
You might also consider having all the perl includes first, at the top
of the XS file. Place any additional headers required after that.
--bod
Reply to: