From: "Ged Haywood" <[EMAIL PROTECTED]>
> Hi all,
>
> On Mon, 8 Jul 2002, Owen Scott Medd wrote:
>
> > > How do you run 'C' code from Apache/mod_perl?
> >
> > Using the perl XS interface usually... that's how we access our text
> > analysis routines which are in C.
>
> Or use Inline.pm if you don't want to get too deeply into it.
>
> Or put your compiled code in the cgi-bin directory if you really can't
> be bothered at all, but that's nasty.
>
> Ged.

Ged must be kidding about throwing C binaries in CGI-BIN directory.
Anyway, I am trying to use some C programs in CGI-PERL/mod_perl/Apache.
I have tried Inline C.   I am not able to get the pointer working under
Inline C.

Owen, if you could give me any  location/documentation/tutorial  for how to
use
perlXS interface efficiently to access C progs, that will be great.

Here is my code.  Any help will be appreciated.

#!/usr/bin/perl -w
use Inline C  => DATA =>
            INC=>'-I/path/to//h -I/usr/include -I/usr/local/include',

           LIBS=>'-Lmy/libfiles1
                  -L/my/libfiles2';

print("Test from Perl program");

myfunction();

    __END__
    __C__

#include "myhfile.h"
/
*-------------------------------------------------------------------------*/
void myfunction()
{
print("Test from C program");
  if (my->pointer_status != 'y')
  {
    printf("My message here");
  }
    return;
}



Reply via email to