Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have to use Windows 7 for some reason, but sometimes I need to compile and execute simple programs using C language, which are supposed to work in Linux. All of them are console applications, don't use graphics or something.

I'm not allowed to install second OS, but I'm free to use any virtual machines. Also occasionally I have to change workplaces, so I don't want to install and setup Cygwin or MinGW or something every time, just copy my virtual machine.

I know, I can work directly in VM, but I want this VM to use as little memory as possibly, and I'd like to use server variants of Linux such as RedHat or Ubuntu Server.

That's what I want:

  1. I have a a virtual machine with a Linux, all libraries and everything are already installed there. Doesn't matter for me is it VMWare or VirtualBox or something.
  2. I ran it in background mode (in Windows).
  3. I ran an IDE, NetBeans for example, or something appropriate in Windows, and set it to work with my virtual machine, using SSH or something.
  4. When I compile my program, IDE uses my VM libraries and gcc, compiles it there, and shows me results into it's own terminal window.

Is there any way to implement this?

Thank you in advance!

share|improve this question
    
Why not skip the VM all together? There are plenty of online web-based compilers out there with IDEs. compilr.com I hear is a good one. –  Keltari Apr 7 '13 at 13:19
    
Thank you for your advice, and I'll learn more about it, but at the moment I see three problems: 1. Sometimes I might have no Internet 2. I'll not be able to check specific things, like sockets 3. I'll not be able to load experimental libraries. But idea is great –  shomel Apr 7 '13 at 13:33
    
Just set up a script in the VM to fetch files from the IDE-project - or transfer the files to the VM from the host. Once synced, run a second build script. Depending on the flexibility of the IDE, you could set up a "build job" to send the files and invoke the build script. Which part are you struggling with? You could do all of this with just rsync (host and VM) and bash (VM). –  Ярослав Рахматуллин Jul 25 '13 at 1:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.