compiling perl - win32 
Author Message
 compiling perl - win32

Hey,

I have a problem if ya haven't guessed that yet. I still never have been
able to compile a perl script unfortunalely. My situation follows:

Im still using Activestate Perl 5.6.1 but also have AP6. Im trying this
with the old 5.6.1 package. I wrote a small very basic perl script thats
looks like this:

"test.pl"
------------------------------------------------------------
#!k:/perl/bin/perl

print "test";
------------------------------------------------------------

Now that works fine. If i compile it with 'perl-MO=Bytecode test.pl' then
it compiles fine. The problem with that is that it wont run and gives the
errror that the file is to big to execute. I have no idea why it compiles
without errors but refuses to run.

So next i would try to compile for C or C++ so i can "try" to compile it
with borland or something .. But when compiling i get the following error.

------------------------------------------------------------
I:\test>perl -MO=CC test.pl
Prescan
Can't call method "can" without a package or object reference at
c:/Perl/lib/B/C
.pm line 1341.
CHECK failed--call queue aborted.
I:\test>
------------------------------------------------------------


isn't clear enough for me. So please dont refer me back to that. Ive been
searching google for the last 3 hours.. Without much usefull results.

Does anyone have an answer or know some good documentation on how to make
an executable from a perlscript with perl itself. I know that perl2exe
works fine but thats not what i want. =]

Thanx in advance
Vincent.



Sun, 26 Dec 2004 18:13:37 GMT  
 compiling perl - win32
[snip problems running perlcc]

Quote:
> Does anyone have an answer or know some good documentation on how to
> make an executable from a perlscript with perl itself. I know that
> perl2exe works fine but thats not what i want. =]

The best I can suggest is hire a programmer.

Well, either that or wait for perl6/parrot, since supposedly, there will
be compilers to convert parrot bytecode to C asm or even directly to an
executable.

You *could* try installing whatever version of perl that B::CC *first*
appeared with... if you're *really* lucky, it will work for you.

--

pack 'u', pack 'H*', 'ab5cf4021bafd28972030972b00a218eb9720000';



Mon, 27 Dec 2004 08:22:20 GMT  
 compiling perl - win32

Quote:


> [snip problems running perlcc]
>> Does anyone have an answer or know some good
>> documentation on how to make an executable from
>> a perlscript with perl itself. I know that
>> perl2exe works fine but thats not what i want.
>> =]

> The best I can suggest is hire a programmer.

Do you mean to translate the perl to a compiled
language?  Like C maybe?

Is there a C subroutine library that emulates
some of perl's native capabilities?  If so, I'd
like to know about it, because there are some
things C does (esp. structs) that I just cannot
grok the perl way of doing, and I really like
programming in C.



Mon, 27 Dec 2004 09:12:23 GMT  
 compiling perl - win32

Quote:



> > [snip problems running perlcc]
> >> Does anyone have an answer or know some good
> >> documentation on how to make an executable from
> >> a perlscript with perl itself. I know that
> >> perl2exe works fine but thats not what i want.
> >> =]

> > The best I can suggest is hire a programmer.

> Do you mean to translate the perl to a compiled
> language?  Like C maybe?

That's what the OP wants.  But there's no way (other than the
deprecated, unsupported, perlcc program, which AFAIK only ever worked
for some releases of 5.005) to automatically convert from perl to C.

So he needs to hire a programmer.

Quote:
> Is there a C subroutine library that emulates
> some of perl's native capabilities?

The perl programming language is written in C.

What precisely do you mean by your question?

Quote:
> If so, I'd like to know about it, because there are some
> things C does (esp. structs) that I just cannot
> grok the perl way of doing, and I really like
> programming in C.

Err, a moment ago you were asking how to do perl stuff in C, and now
you're asking how to do C stuff in perl?

Anyway, one would use a hash or hashref in place of a struct.

That is, where a C program might have:

   typedef struct { int a; char *b } foo;
   foo blat = { 1, "quux" };
   ++blat.a;

A perl program doing the same stuff might have:

   my $blat = { a => 1, b => "quux" };
   ++$blat{a};

--

pack 'u', pack 'H*', 'ab5cf4021bafd28972030972b00a218eb9720000';



Mon, 27 Dec 2004 09:42:22 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Can't compile Perl/Tk under native Win32 Perl 5.8.0

2. perl Conditional compile - Running Win32 library calls on AIX

3. compiling perl scripts under win32 platform

4. Compiled perl on win32

5. Compiling Perl on Win32

6. Compiling Perl on Win32

7. Compiling Perl on Win32 (With Borland)

8. Compiling Perl with on Win32 (Borland)

9. Compiling Perl scripts into byte code on Win32

10. Help: Perl for Win32 source distribution compile error

11. Compiling perl into win32 app?

12. compiling Tk on Win32 with perl-5.8

 

 
Powered by phpBB® Forum Software