I''ve downloaded your perl script, and I''m trying to run it on my linux system (it''s got Perl 5 and Apache installed) but I get the following errors (when running from the command line : PERL CPP2HTML.PL)
Prototype mismatch: sub main::head vs ($) at cpp2html.pl line 12
Global symbol "$myurl" requires explicit package name at cpp2html.pl line 52.
Global symbol "$thewebpage" requires explicit package name at cpp2html.pl line 55.
Global symbol "$myurl" requires explicit package name at cpp2html.pl line 55.
Execution of cpp2html.pl aborted due to compilation errors.
Any ideas?
Having read you code it looks simple enough.
Oh I can get rid of the first error by commenting out the following line:
use CGI qw(:standard);
Online .cpp parsing into HTML
When I find my code in tons of trouble,Friends and colleages come to me,Speaking words of wisdom:"Write in C."My Web Site
I''ve tried running it by entering:
http://members.tripod.com/immagnuman/cgi-bin/cpp2html.pl?src=http://baskuenen.cfxweb.net/sources/vector.h
I get a page back, with an error from the server saying:
"Your script produced this error: (Maybe you didn''t strip carriage returns after a network transfer?)"
Am I doing something wrong?
http://members.tripod.com/immagnuman/cgi-bin/cpp2html.pl?src=http://baskuenen.cfxweb.net/sources/vector.h
I get a page back, with an error from the server saying:
"Your script produced this error: (Maybe you didn''t strip carriage returns after a network transfer?)"
Am I doing something wrong?
I got the same error bas, I tried it to see if I might have downloaded it incorrectly....
When I find my code in tons of trouble,Friends and colleages come to me,Speaking words of wisdom:"Write in C."My Web Site
It would be great with CSS-support. Then people could use their own fonts/colors/formatting, without having to edit the perl-script
..hmmm... Might take a look at your scipt ImmaGNUman
..hmmm... Might take a look at your scipt ImmaGNUman
I finally got the script working on my PC just now, I had to remove all of the uses stuff and then re-write how it was loading the filename from the query string. I''m going to try and upload both of them to my website and see if they work on there, since I''ve never used modules in perls before I do not know if my web site provider uses them. I''ll let you know how I get on later
When I find my code in tons of trouble,Friends and colleages come to me,Speaking words of wisdom:"Write in C."My Web Site
I made one in PHP3 a little while ago that can make use of a syntax file to color any syntax.
I have made a CPP syntax file and an HTML syntax file that use STYLE for coloring the code.
The only problem I have encountered is that for medium and large sized files it doesn''t work well (in fact it takes too long).
If one could check up my code and tell me what kind of optimization I can make, I would appreciate.
(( PS: It''s really easy to make a syntax file, so we could make one for VB, ASP, LISP, any language! ))
Thanks
Now I know what I''m made of, and I''m afraid of it...
I have made a CPP syntax file and an HTML syntax file that use STYLE for coloring the code.
The only problem I have encountered is that for medium and large sized files it doesn''t work well (in fact it takes too long).
If one could check up my code and tell me what kind of optimization I can make, I would appreciate.
(( PS: It''s really easy to make a syntax file, so we could make one for VB, ASP, LISP, any language! ))
Thanks
Now I know what I''m made of, and I''m afraid of it...
Now I know what I'm made of, and I'm afraid of it...
quote: Original post by baskuenen
I get a page back, with an error from the server saying:
"Your script produced this error: (Maybe you didn''t strip carriage returns after a network transfer?)"
That error usually means that the script is not saved in UNIX format (y''know, the whole return carriage / line feed thing with unix & clones).
Immagnuman - why dont you just have a simple webpage where someone can copy & paste their code into a text box and the script can just read it off the standard input?
quote:
I had to remove all of the uses stuff and then re-write how it was loading the filename from the query string.
You didnt have to do that. By the looks of it your problem was just that your system didnt have the required libraries installed. You can get the LWP one at CPAN, just like every other perl libary in existance.
jumble-----------
My web site provider does not have those modules ethier, and I''m having very limited success at getting the code to work on-line.
And I re-wrote the code after I downloaded the libs, I did have it working under the command line but once I ran it via the web broser I got the same error as bas got from immagnuman''s web site (server error 500)
Oh there is an interesting problem with the following bit of C code when ran though your perl script :
#ifdef
1) #ifdef is not defined as a preprocessor directive
2) when added as a preprocessor directive it is not hilighted
3) the if part is hilighted as a command
Also hStdout variable the do is highlighted
Just some little things for you to look at
And I re-wrote the code after I downloaded the libs, I did have it working under the command line but once I ran it via the web broser I got the same error as bas got from immagnuman''s web site (server error 500)
Oh there is an interesting problem with the following bit of C code when ran though your perl script :
#ifdef
1) #ifdef is not defined as a preprocessor directive
2) when added as a preprocessor directive it is not hilighted
3) the if part is hilighted as a command
Also hStdout variable the do is highlighted
Just some little things for you to look at
When I find my code in tons of trouble,Friends and colleages come to me,Speaking words of wisdom:"Write in C."My Web Site
I'll save it to Unix format.
But, I guess I'll just make a simple page with a textbox for the user to enter in the url with the source...
I forgot to add #ifdef, so I added it and ifndef, am I missing any other directives? The keywords should be all there tho.
Should have it running soon...
-----------------------------
A wise man once said "A person with half a clue is more dangerous than a person with or without one."
The Micro$haft BSOD T-Shirt
Edited by - immaGNUman on November 10, 2000 5:54:54 PM
But, I guess I'll just make a simple page with a textbox for the user to enter in the url with the source...
I forgot to add #ifdef, so I added it and ifndef, am I missing any other directives? The keywords should be all there tho.
Should have it running soon...
-----------------------------
A wise man once said "A person with half a clue is more dangerous than a person with or without one."
The Micro$haft BSOD T-Shirt
Edited by - immaGNUman on November 10, 2000 5:54:54 PM
-----------------------------A wise man once said "A person with half a clue is more dangerous than a person with or without one."The Micro$haft BSOD T-Shirt
Ok, without using the tripod server, has anyone had probs using the cpp2html on their own server?
-----------------------------
A wise man once said "A person with half a clue is more dangerous than a person with or without one."
The Micro$haft BSOD T-Shirt
-----------------------------
A wise man once said "A person with half a clue is more dangerous than a person with or without one."
The Micro$haft BSOD T-Shirt
-----------------------------A wise man once said "A person with half a clue is more dangerous than a person with or without one."The Micro$haft BSOD T-Shirt
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement