And I got the following output:my $kk = kk(); print "perl kk=$kk\n"; use Inline C => <<'END_OF_C_CODE'; #include <stdio.h> #include <stdlib.h> #include <string.h> int kk () { printf("Hello!\n"); return(0); } END_OF_C_CODE
So I can compile something, I then kept adding the lines I needed one at a time until I got to this:Hello! perl kk=0
Which broke complaining that :perl: symbol lookup error: /HASP/perltestP/_Inline/lib/auto/c2_pl_4339/c2_pl_4339.so: undefined symbol: hasp_login".my $kk = kk(); print "perl kk=$kk\n"; use Inline C => Config => LIBS => '-L/HASP/perltestP -llibhasp_linux.a +'; use Inline C => <<'END_OF_C_CODE'; #include <stdio.h> #include <stdlib.h> #include <string.h> #include <hasp_hl.h> #include <hasp_vcode.h> int kk () { hasp_status_t status; hasp_handle_t handle; int i; char filename[] = "prg"; printf("Hello!\n"); status = hasp_login(HASP_PROGNUM_DEFAULT_FID, (hasp_vendor_code_t *)vendor_code, &handle); // switch (status) { // case HASP_STATUS_OK: // printf("OK\n"); // hasp_logout(handle); // return(1); // break; // default: // printf("BAD\n"); return(0); } END_OF_C_CODE
This would indicate that Inline::C is unable to resolve extenal references that are not from itself ??? I think it all relates the the tests that are being failed on the "make test" of the Inlince::C installation. I've googled and I have checked the bug reports in cpan.org. Nothing really looks like this. Should I report it as a bug to "INGY" on cpan.org's site?#include <stdio.h> #include <stdlib.h> #include <string.h> #include <hasp_hl.h> #include <hasp_vcode.h> int kk () { hasp_status_t status; hasp_handle_t handle; int i; printf("start : "); status = hasp_login(HASP_PROGNUM_DEFAULT_FID, (hasp_vendor_code_t *)vendor_code, &handle); switch (status) { case HASP_STATUS_OK: printf("OK\n"); hasp_logout(handle); return(1); break; default: printf("BAD\n"); return(0); } } int main(void) { int result; result = kk(); printf("result was %d\n",result); }
In reply to Re^6: Inline::C produces compilation errors
by holandes777
in thread Inline::C produces compilation errors
by holandes777
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |