New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better error message when type not in typemap #52
Comments
You've certainly identified something that needs some attention, but "char basic C types... When one (or more) of the argument types is not in the standard typemap, For example, this builds fine even though "double *" is not in the typemap: use Inline C => <<'EOC'; int foo (int i, double * x) { EOC It only fails if we then try to call foo() from perl: Undefined subroutine &main::foo called at try.pl line xx. I haven't yet worked out why the "char **" invocation produces the compile Cheers, From: Ed Avis If Inline::C tries to wrap a function where one of the argument types is not — |
Thanks for investigating. I observed the build error on Cygwin but not on Linux. If I stop using |
I should have indicated that I was using (native) Windows. I don't have a usable Cygwin, so I'm guessing that the underlying Windows Cheers, |
So ... perl gives us a typemap that references a function that is not available (_XS_unpack_charPtrPtr). I think Inline::C is entitled to assume that the standard typemap pulls in valid code. Should I file a bug report against perl's typemap ? (At least I now understand the significance of #53 .) |
If Inline::C tries to wrap a function where one of the argument types is not in the standard typemap, you get a build error like
undefined reference to 'XS_unpack_charPtrPtr'
. This is a bit perplexing. It would be better to check this earlier and produce a friendly message likefunction foo takes parameter x of type char ** but that type is not in the typemap file
.The text was updated successfully, but these errors were encountered: