in reply to Automatically Import XS struct
Then I create an Inline::C script:struct rtlsdr_dev { int x; double d; };
When I run that script, it outputs (as expected):use strict; use warnings; use Inline C =><<'EOC'; #include <SDR.h> void baz() { struct rtlsdr_dev mine; mine.x = 1032; mine.d = sqrt(2.0); printf("%d %.16e\n", mine.x, mine.d); } EOC baz();
Given that Inline::C is nothing more than a module that autogenerates an XS file, then compiles and runs that XS code, I'm wondering what the difficulty is.1032 1.4142135623730951e+00
|
|---|