c depuis perl

Pàgina inicial

Reply to this message
Autor: Patrick Dupre
Data:  
A: Linux38
Assumpte: c depuis perl
Bonjour,

Si quelqu'un a deja fait un appel d'un routine c depuis perl, je suis
preneur de l'example. Tou ce que j'ai essayer foir alors que c'est
dans la doc sur internet.

L'example 1 de ctan donne:
quand je run le make.

When I try to run your example: 
void
        hello()
                CODE:
                printf("Hello, world!\n");


on a Fedora 4 machine I get an error:
/usr/bin/perl /usr/lib/perl5/5.8.6/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.6/ExtUtils/typemap Mytest.xs > Mytest.xsc && mv Mytest.xsc Mytest.c
Error: Cannot parse function definition from ' is_even(input)' in Mytest.xs, line 13
Please specify prototyping behavior for Mytest.xs (see perlxs manual)
make: *** [Mytest.c] Error 1


-- 
---
==============================================================================
  Patrick DUPRE                 |   |
  Department of Chemistry       |   |  Phone: (614) 292-8406
  Ohio State University         |   |  Fax:  (614) 292-1948
  120 West 18th Avenue          |   |
  Columbus, OH 43210-1173       |   |  email: pdupre@???
==============================================================================