my $kk = kk(); print "perl kk=$kk\n"; use Inline C => <<'END_OF_C_CODE'; #include #include #include int kk () { printf("Hello!\n"); return(0); } END_OF_C_CODE #### Hello! perl kk=0 #### 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 #include #include #include #include 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 #### #include #include #include #include #include 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); }