in reply to Errors using DLL from Inline C with 32-bit Perl
Print a pointer using the appropriate formatter:
printf("%p\n", im);It's also a good idea to check that im and tag are returned not-null after the function calls.
And also call FreeImage_GetFileType(fname, 0) on a separate line to make sure it does return a valid type too.
Then insert a lot more printf statements to see exactly which function fails.
just general debugging advice...
If it's too important then run it through a debugger (not Perl's, I mean gdb or something).
btw, to add on what syphilis said about making sure the same libraries are loaded (for Inline::C and gcc), make sure that the same compiler flags are used too. There must be a Makefile somewhere created by Inline::C (edit: for your specific script. In linux is in the same dir) which will show you exactly how the C-part of your script is compiled.
bw, bliako
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Errors using DLL from Inline C with 32-bit Perl
by syphilis (Archbishop) on Jan 30, 2020 at 21:53 UTC |