The attached testcase produces these errors at run-time: testcase_pl_bb52.xs:12:12: missing terminating " character testcase_pl_bb52.xs:13:1: missing terminating " character testcase_pl_bb52.xs: In function `test': testcase_pl_bb52.xs:14: error: syntax error before '}' token make: *** [testcase_pl_bb52.o] Error 1 The .xs code generated looks like (yes, the quotes aren't on the same line): void test(char* string) { printf("My string: %s ", string); } when it should be: void test(char* string) { printf("My string: %s\n", string); } Works fine under Red Hat Linux 9. $ rpm -q perl perl-Inline perl-Parse-RecDescent gcc perl-5.8.1-92 perl-Inline-0.44-8 perl-Parse-RecDescent-1.80-12 gcc-3.3.2-1
Created attachment 95914 [details] inline C test case
Still happens on rawhide.
Well, this is actually because in perl-5.8.x, the <<EOF 'here-doc' quote-like operator does interpolation by default, just like the "" or qq operator; ie. the \n in "My string: %s\n" is changed into a literal new line character in the Inline C source . To turn off interpolation in the here-doc, instead of : use Inline C => <<EOT; do: use Inline C => <<'EOT'; With that modification, your testcase.pl program works fine on FC-4, FC-5, RHEL-3, and RHEL-4. I think the reason it worked with perl-5.8.0 in RHL-9, is that interpolation of here-document strings was broken (perhaps by UTF-8-ness) whereas now it works as intended.