in reply to Re^3: Defining an XS symbol in the Makefile.PL (quoting)
in thread Defining an XS symbol in the Makefile.PL
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Defining an XS symbol in the Makefile.PL (quoting)
by Anonymous Monk on Aug 19, 2019 at 09:15 UTC | |
Heh, whats going on?
| [reply] [d/l] |
by syphilis (Archbishop) on Aug 19, 2019 at 12:05 UTC | |
Good question ... I don't have an answer to that ;-) Your code still results in the same error for me: fatal error: EXTERN.h: No such file or directory. Looks like the "-iquote" that my Inline-C-0.81 invokes is stuffing things up. UPDATE: No, it has nothing to do with "-iquote". Turns out that when I switched to I-C-0.76 I also switched to EU-MM-7.04, and the problem I'm facing is due solely to a change that occurs in EU::MM some time between 7.0401 (which is fine) and 7.1001 (which breaks Inline::C). I'll investigate further when I get a chance and file a bug report if warranted. What version of Inline::C are you running ? When I switch to Inline-C-0.76, your script works fine - as does mine if I replace the incorrect SV * foo(... with void foo(.... But now I'm puzzled as to the output we get for printf("***%s***\n", MY_FORMAT); The quotes either side of %.17e are apparently missing from MY_FORMAT. So how does printf(MY_FORMAT, sqrt(2.0)) even compile ? Can you explain that ? BTW, seems that my problem with finding a correct rendition for the DEFINE in the Makefile.PL is dependent upon the version of EU::MM. With EU-MM-7.04, this is fine: But with EU-MM-7.34 (which is what I've been using) the crucial percentage symbol is still being omitted. Cheers, Rob | [reply] [d/l] [select] |
by jcb (Parson) on Aug 19, 2019 at 22:45 UTC | |
But now I'm puzzled as to the output we get for printf("***%s***\n", MY_FORMAT); The quotes either side of %.17e are apparently missing from MY_FORMAT. So how does printf(MY_FORMAT, sqrt(2.0)) even compile ? C syntax and preprocessing rules. MY_FORMAT is substituted by the C preprocessor, so the compiler sees printf("***%s***\n", "%.17e");, strips the quotes off of the string constant like any other, and the output is ***%.17e*** if everything works correctly. The % character is also special in the DOS shell, which uses it for variable substitution: %PATH% on DOS is $PATH on *nix. The trailing % is required, but I would not be surprised if bugs in the shell like to eat random % characters. You will be much better off passing a number instead of a string constant if you want this to compile on Windows. | [reply] [d/l] [select] |
by syphilis (Archbishop) on Aug 20, 2019 at 00:59 UTC | |
by Anonymous Monk on Aug 21, 2019 at 01:26 UTC | |
| [reply] [d/l] |