Add compiler to Page

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hello All
I want to add gcc comnpiler online to page  
how can i do it .
i dont know please help me.

Re: Add compiler to Page

On 5/28/2014 7:06 AM, wrote:
Quoted text here. Click to load it

Perhaps others can discern your intent, but I can't.
Please explain what you are trying to do with an overview and  
then more detail of what you have tried.


Re: Add compiler to Page

On Wed, 28 May 2014 07:38:32 -0400, bill wrote:

Quoted text here. Click to load it

My first guess was that OP wishes to upload a c or c++ source file to a  
web server and then receive an executable back .... but that seems such a  
daft thing to try and do that I assumed I must be wrong.

Reasons it's daft:

Libraries - how do you know the compiler is linking the right ones.
Bits - or the right number of bits.
OS - or even for the right OS.

And - do I really want someone elses arbitrary code sitting in a compiled  
executable on my server? [mode=sarcasm]Why yes, of course I do, I can't  
see any way in which that could possibly go wrong or introduce any  
security vulnerabilities at all.[/mode]

Denis McMahon,

Re: Add compiler to Page

On 5/28/2014 8:10 AM, Denis McMahon wrote:
Quoted text here. Click to load it


That was my thought, but you beat me to it :)

I thought about doing this a number of years ago for online training,  
but decided against it.  It *could* be possible to safely compile an  
executable on the server using a chroot jail.  However, that setup would  
be very prone to errors, opening the system up wide to hacking.  I  
wouldn't trust many Linux admins (including myself) to do it properly.

I just installed an SSH server and gave each student their own id (and  
home directory).  It was much cleaner.

However, if the OP insists on exposing his system (he won't get this to  
work on a shared host for the reasons you mentioned), passthru() would  
be able to call the compiler.

But please let us know the URL so we can stay away from that site.

Remove the "x" from my email address
Jerry Stuckle

Re: Add compiler to Page

Quoted text here. Click to load it

Way back in the dim dark past, there used to be something called 'crobots'.
This was a *simple* self-contained C compiler system, with a very limited
library that compiled to a VM byte-code (ala Java). The only sorts of programs
that were possible were programs to automate a 'virtual' robot tank that could
sense and shoot at another 'virtual' robot tank. Typically you would 'load'
two of these 'programs' and the two robot tanks would shoot at each other until
one was destroyed. I had this installed on my FidoNet BBS and BBS users could
upload little C programs that could be loaded into this program. The library
that the crobots supplied was very similar to the sorts of libraries supplied
with the Ardunio IDE -- I guess building Ardunio-based tank robots equiped
with sensors and (Nerf warhead!) cannons would be one way to resurect crobots
with 'modern' hardware...

Quoted text here. Click to load it

Robert Heller             -- 978-544-6933 /
Deepwoods Software        --
()  ascii ribbon campaign -- against html e-mail
/\   -- against proprietary attachments


Re: Add compiler to Page

On 5/28/2014 9:28 AM, Robert Heller wrote:
Quoted text here. Click to load it


Ah yes, I remember crobots.  It was a fun game.  Unfortunately, I never  
was very good at it :)

But why take all the fun out of it (Nerf warhead)?  Why not make it  
interesting.  A nuclear warhead would be very enjoyable.  It doesn't  
have to be that big - 10K ton would do just fine :)

Remove the "x" from my email address
Jerry Stuckle

Site Timeline