Kevin Ryan <kevinr@col.hp.com> writes: >I was in: > >http://www.perl.com/CPAN-local/doc/manual/html/pod/perlembed.html#Compiling_your_C_program That documents up-to-date perl i.e. perl5.005+ > >and I had trouble compiling the string.c example. Specifically the >line: > >printf("a = %s\n", SvPV(perl_get_sv("a", FALSE), PL_na)); > >was the trouble maker. PL_na was undefined. I did, however, find: > >/opt/perl5/lib/CORE/perl.h:EXT STRLEN na; /* for use in >SvPV when length is Not Applicable */ > >So I changed the line to the following and it compiles/runs just fine. > >printf("a = %s\n", SvPV(perl_get_sv("a", FALSE), na)); > >------------------------------------------------------------ >perl -V gives: >Summary of my perl5 (5.0 patchlevel 4 subversion 4) configuration: Yes for old perl5.00404 it used to be called 'na' - we changed it so that all the variable names are consistently prefixed PL_ to avoid clashes with user variables. While 'na' may not be too much of a problem 'dirty' and serveral others were a real problem. -- Nick Ing-SimmonsThread Previous