Sisyphus wrote:
Patrik Jacoby wrote:

hello,
i'm trying to use some c functions via perl using inline. It seems that my script is well I get an


Finished Build Compile Stage

but after that perl is not able to locate my .al file for my function. Until now I can't locate by myself. But I don't see any errors or warnings - nothing. Can somebody help me out ?. I'm new to perl but not to C.


It's just that the inline function can't be found for some reason - so perl assumes the function must be loadable from an .al file - but can't find that file because it doesn't (and shouldn't) exist.


Post us a simple script that exhibits the problem and someone should be able to tell you why the inline function is not being found.

Cheers,
Rob



ok, I'm trying to include the c functions to encode punycode in my perl script:


#!/usr/bin/perl

use Inline C => DATA =>
        LIBS => '-lxcode',
        TYPEMAPS => './typemap',
        BUILD_NOISY => '1',
        PREFIX => 'c_';

my $arg = shift;
my $result;
my $len;

c_Xcode_puny_decodeString( $arg, length($arg), $result, $len );

print "$arg . : $result\n";

__END__
__C__

#include <xcode.h>
int c_Xcode_puny_encodeString( void * pdwzInputString,
        int iInputSize,
        void * pzOutputString,
        void * piOutputSize ) {

        int result = Xcode_puny_encodeString( (DWORD*)pdwzInputString,
                                 (int)iInputSize,
                                 (UCHAR8*)pzOutputString,
                                 (int*)piOutputSize );
        if ( result != XCODE_SUCCESS ) {
                return 0;
        }
return 1;
}

I extended the typemap for UCHAR8, DWORD but I think I didn't even have to because it's "c internal" am I right with that ?.

Patrik



Reply via email to