Thanks for that, i'll check it out.
I used perlcc -sav to generate the c file.
perlcc works well, but the script i'm
writing has to work just as well on win
as linux - i guess i was just curious!
Thanks anyway :)
From: Fergal Daly [mailto:fergal at esatclear.ie]
Sent: Thursday, July 26, 2001 4:53 PM
To: Barry Carroll
Cc: 'ilug at linux.ie'
Subject: Re: [ILUG] RE: GCC and perl
The example from the perlembed manpage is
gcc -O2 -Dbool=char -DHAS_BOOL -I/usr/local/include
-o interp interp.c -lperl -lm
so I reckon adding
-L/usr/libdata/perl/5.00503/mach/CORE/ -lperl -lm
should do the trick. I thought perlcc does the compiling for you anyway,
what did you use to produce the .c file?
On Thu, Jul 26, 2001 at 04:27:04PM +0100, Barry Carroll wrote:
> thanks to all so far....
>> what I did since was to go into the source and give the paths in all
> the #include statements. The paths are correct.
>> eg: #include "/usr/libdata/perl/5.00503/mach/CORE/EXTERN.h"
>> then i invoke gcc: gcc -v -o test2exe test2.pl.c
>> It generated the object file, so is this a linking error?
>> [first 4 errors}
> /tmp/cc1btNUh.o: In function `perl_init':
> /tmp/cc1btNUh.o(.text+0x17): undefined reference to `Perl_av_extend'
> /tmp/cc1btNUh.o(.text+0x2d): undefined reference to `PL_sv_undef'
> /tmp/cc1btNUh.o(.text+0x68): etc etc
>> I get this same type of error even if i leave the source alone
> and invoke gcc as follows:
>> gcc -v -o test2 test2.pl.c -I/usr/libdata/perl/5.00503/mach/CORE/
>> Thanks guys,
>> -----Original Message-----
> From: jac1 [mailto:jac1 at student.cs.ucc.ie]
> Sent: Thursday, July 26, 2001 4:24 PM
> To: Barry Carroll
> Subject: RE: [ILUG] RE: GCC and perl
>>> Try just doing:
> gcc test2.c test2.pl.c -o testapp
>> If you get #include errors, look for the missing headers and include them
>> the compilation as follows:
> gcc -I<missing_path> test2.c test2.pl.c -o testapp
>> >===== Original Message From Barry Carroll <barry.carroll at trintech.com>
> >I am using this on the comand line, I'm sure it'll seem ridiculous
> >to you all! ;)
> >gcc -mpentium -o test2.c test2.pl.c -include
> >-----Original Message-----
> >From: Barry Carroll
> >Sent: Thursday, July 26, 2001 3:51 PM
> >To: ilug at linux.ie> >Subject: GCC and perl
> >I used some of the experimental features of perl to convert
> >one of my scripts into c source code.
> >I'm logged into a FreeBSD box, actually DCU's 'redbrick'.
> >I'm trying to compile the source, but just cant figure out how
> >to do it.
> >I copied the required header files into my home dir, but it's
> >saying 'compilation of header files requested'
> >Can anyone help - I want to try and compile it for the pentium
> >Irish Linux Users' Group: ilug at linux.ie> >http://www.linux.ie/mailman/listinfo/ilug for (un)subscription
> >List maintainer: listmaster at linux.ie>>> --
> Irish Linux Users' Group: ilug at linux.ie>http://www.linux.ie/mailman/listinfo/ilug for (un)subscription
> List maintainer: listmaster at linux.ie
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!