in reply to Defining an XS symbol in the Makefile.PL
I've found that it has nothing to do with the versions of Inline::C or ExtUtils::MakeMaker or perl itself.use strict; use warnings; use Config; use Inline C => Config => USING => 'ParseRegExp', CCFLAGSEX => '-DMY_FORMAT=\\"%.16e\\"', BUILD_NOISY => 1, ; use Inline C =><<'EOC'; SV * foo(void) { printf(MY_FORMAT, sqrt(2.0)); printf("\n"); } EOC foo();
and either of these will work with gmake (but not with dmake):CCFLAGSEX => '-DMY_FORMAT=\\"%.16e\\"', CCFLAGSEX => "-DMY_FORMAT=\\\"%.16e\\\"", CCFLAGSEX => q["-DMY_FORMAT=\\"%.16e\\""],
The situation with gmake looks very much like a bug to me.CCFLAGSEX => '-DMY_FORMAT=\\"%%.16e\\"', CCFLAGSEX => "-DMY_FORMAT=\\\"%%.16e\\\"", CCFLAGSEX => q["-DMY_FORMAT=\\"%%.16e\\""],
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Defining an XS symbol in the Makefile.PL (largely solved)
by jcb (Parson) on Aug 21, 2019 at 23:05 UTC | |
by syphilis (Archbishop) on Aug 22, 2019 at 01:29 UTC | |
by jcb (Parson) on Aug 22, 2019 at 02:24 UTC | |
by syphilis (Archbishop) on Aug 22, 2019 at 04:04 UTC | |
by jcb (Parson) on Aug 22, 2019 at 04:22 UTC | |
| |
by Anonymous Monk on Aug 22, 2019 at 02:54 UTC |