Hi,

I have been successful creating helloworld by hard coding it into the inline
part of my perl script.
But, what I really want to do is include a header file and call a function
from it.  This is what I have done:

My perl script:

#!/usr/local/bin/perl 

use Inline (C => CONFIG => 
            LIBS => '-lhello');
use Inline C;  

my_hello();

__DATA__
__C__

#include <hello.h>

my_hello() 
{
   hello();
}



out.make from debug/compile dir:

/usr/local/bin/perl -I/usr/local/lib/perl5/5.00503/sun4-solaris
-I/usr/local/lib/perl5/5.00503 /usr/local/lib/perl5/5.00503/ExtUtils/xsubpp
-typemap /usr/local/lib/perl5/5.00503/ExtUtils/typemap  hell_pl_73e9.xs
>hell_pl_73e9.tc && mv hell_pl_73e9.tc hell_pl_73e9.c
gcc -c -I/home/bbcannon/inlineC/hw -I/usr/local/include -O
-DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" -fPIC
-I/usr/local/lib/perl5/5.00503/sun4-solaris/CORE  hell_pl_73e9.c
hell_pl_73e9.c:19: syntax error before `void'
make: *** [hell_pl_73e9.o] Error 1



hell_pl_73e9.c from debug/compile dir:

/*
 * This file was generated automatically by xsubpp version 1.9507 from the 
 * contents of hell_pl_73e9.xs. Do not edit this file, edit hell_pl_73e9.xs
instead.
 *
 *      ANY CHANGES MADE HERE WILL BE LOST! 
 *
 */

#line 1 "hell_pl_73e9.xs"
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "INLINE.h"
CONFIG
#line 16 "hell_pl_73e9.c"
#ifdef __cplusplus
extern "C"
#endif
XS(boot_hell_pl_73e9)
{
    dXSARGS;
    char* file = __FILE__;

    XS_VERSION_BOOTCHECK ;

    XSRETURN_YES;
}

Can anybody see what I'm doing wrong here? I apologize if this is a little
basic.


Thanks...
Brady Cannon
Modeling Intern
R&D Engineering Support

Reply via email to