Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5709
  • Last Modified:

Convert PERL to C or C++...

I need translate a code from PERL to C or C++.
Where can I found a tool for help me the translation ?
0
grava_cd
Asked:
grava_cd
  • 3
  • 2
  • 2
  • +1
2 Solutions
 
SapaCommented:
try to type:

perldoc perlcc

and read this document.

Andrey
0
 
grava_cdAuthor Commented:
Hi !

Thanks...
I try many times use the perlcc, but the C code is dependent of the perl56.lib and anothers modules..
and dont run ... dont correct translate the code...
:-(
0
 
SapaCommented:
perl56.lib is just a Perl interpreter library. In activestate distribution it's named bin/perlcore.dll
Unfortunately it's impossible to translate Perl to C and does not link binary with Perl interpreter.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
PeeweeCommented:
grava_cd,
the perlcc function will turn your perl into c code using perl libraries.

As Perl is written in c, it is actually doing stage one in execution, ie turning perl into c and then it will run the c program.

Hence it will never be a perfect translation into a nice c program, as it will always have a perl emphasis within the c code.

The best way to get c or C++ code from perl is unfortunately to re-write it in c/c++.  Here's a good article for you:

http://www.perl.com/pub/a/2001/06/27/ctoperl.html

regards
Peewee
0
 
PeeweeCommented:
grava_cd,
i forgot to mention the emphasis of the document is why not to bother compiling your perl into c.

regards
Peewee
0
 
grava_cdAuthor Commented:
Thanks...

Do you know where can I found a library or C++ source for help me the source convertion ?

Libraries for simulate the PERL Hashes, Arrays in C...
with this feature, I thing is more easy for manually converting the sources.

Thanks
0
 
PeeweeCommented:
0
 
inq123Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Split b/w Peewee and Sapa

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

inq123
EE Cleanup Volunteer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now