Earlier, I was asking how I would do this, and many people suggested using SSH. However, when I attempted to
use SSH at school, it turns out that the school system was
too secure(this is a fairly rare occurence).
However, that effectively limits the way that I can get my C++ over to the other computer and compile it, to see which errors it has. I need to create a CGI script that I can put on my linux box, that will take the code I give it, compile it, and give me any of the errors thrown at compile time. I am
not planning on actually running the compiled program, I simply want to catch the output from the compiler when compiling.
Does anyone know how exactly I would do this?
I'm fairly certain that in order to get it all to work, I would need to have the CGI script write it's contents(form) out to a file(test.cpp or something), and then somehow call the compiler on it, and trap the errors.
However, I'm not 100% certain of how I would call the compiler and trap the errors. Would I be able to use a system call, something like
system(c++ -o testprogram test.cpp);
Or would I have to do it differently? And how would I capture the output of the compiler, so that I could see if there were any errors?
Thanks,
Spidy
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.