How can I have one program that can actualy compile another,

So I'm having a program make a server so the user can set there IP, Port what not,

I rly hope you can help me as soon as you can!