0

I would like to write a tool in windows which compiles a c/cpp program on windows and executes series of tests on them?

It is like Spoj.pl actually.. I wrote a similar thing in linux using fork(). But i could not in windows. Can anyone tell where should i start ?

4
  • Are you compiling some high-level language to C (so C is the object language of your compiler) or do you want to code yet another C compiler (so C is the source language of your compiler)? Sep 3, 2012 at 7:47
  • No. I would like to implement an onlineJudge like spoj.pl which takes C source code and compiles and executes the sourcecode against a set of test cases and produces the result. Sep 3, 2012 at 7:54
  • Are you aware of the security issues, if you put that online on a web server? Sep 3, 2012 at 8:29
  • What might be the security issues? Can you explain ? Sep 6, 2012 at 9:41

1 Answer 1

0

Windows has it's own functions to create new processes but maybe you don't want to go that way. Instead, find out how to run your C compiler from the command line and then use a scripting language like Python or PowerShell to run it and the tests.

The advantage of using a scripting language is that they have powerful tools to create processes and talk to them; plus Python comes with batteries included so it's very simple using it to create nice reports of the test results.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.