you've got 2 main() functions! you cannot have 2 main() functions otherwise the second overrides the first!

I have another solution for you though. you should publish both your scripts separately, then put them both in the same folder. One of the scripts should have an externel .exe execute function (exec(STRING* program, STRING* options)) inside that runs the other one. same in the other script.
Hope this helps..