LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] RE: GCC and perl

[ILUG] RE: GCC and perl

Fergal Daly fergal at esatclear.ie
Thu Jul 26 16:53:43 IST 2001


The example from the perlembed manpage is

gcc -O2 -Dbool=char -DHAS_BOOL -I/usr/local/include
-I/usr/local/lib/perl5/i586-linux/5.003/CORE
-L/usr/local/lib/perl5/i586-linux/5.003/CORE
-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?

Fergal


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,
> 
> Barry.
> 
> -----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 in
> 
> the compilation as follows:
> gcc -I<missing_path> test2.c test2.pl.c -o testapp
> 
> THT
> James
> 
> >===== 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
> >/usr/libdata/perl/5.00503/mach/CORE/*
> >
> >-----Original Message-----
> >From: Barry Carroll
> >Sent: Thursday, July 26, 2001 3:51 PM
> >To: ilug at linux.ie
> >Subject: GCC and perl
> >
> >
> >Hiyas,
> >
> >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
> >architecture...
> >
> >Thanks!
> >
> >--
> >Irish Linux Users' Group: ilug at linux.ie
> >http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
> >List maintainer: listmaster at linux.ie
> 
> 
> -- 
> Irish Linux Users' Group: ilug at linux.ie
> http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
> List maintainer: listmaster at linux.ie

-- 




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


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!
RSS Version
Powered by Dell