Recommended C compiler and environment

slugger_2003

Limp Gawd
Joined
Jan 30, 2007
Messages
365
Hi all. I used Visual Studio express for my C++ assignments for uni and now I'm on an exchange in Sweden and have started a class in C. Does anybody have any recommendations for an environment to program in C?
 
Visual C++ will work for C.

The question is more of do they expect your code to compile under a Linux/Unix environment, or is this just strictly Windows-environment programming? If they will be building and testing your code in a different environment from Windows, you'll probably want to use GCC instead of VC. Should ask your professor about this.
 
If you've already got a Visual Studio license and you're doing windows-only coding then stick with Visual Studio. If your license is invalid, then you can try Dev-C++ by Bloodshed Software for your Windows compiling needs.

If you're on UNIX/Linux then gcc should be pre-installed (it is in most environments) and you should be good to go out of the box.
 
If you need Linux compatibility and you don't feel comfortable using gcc and vim/emacs, you could always just "apt-get install eclipse-cdt" to install eclipse and the C development tools. You can have your GUI and it will still use gcc underneath.
 
If you need Linux compatibility and you don't feel comfortable using gcc and vim/emacs, you could always just "apt-get install eclipse-cdt" to install eclipse and the C development tools. You can have your GUI and it will still use gcc underneath.

Its bad form to assume someone is using a debian/ubuntu system. apt is not installed by default on all Linux systems. When making recommendations like this you should just suggest the application that they should install.

That said, Visual Studio for Windows, and I personally prefer vim and gcc/g++ on Linux. Though if you can get it working right Eclipse is one of the nicest IDE's for Linux
 
I recommend Eclipse as your IDE for *NIX! It's easy to use especially for students.
 
OK, so I need to make the programs run under Solaris..so that would be Linux, yes?
I tried to use VS but it won't let me compile the C code, there just isn't an option to build it seeing as it's not a project....there is no option to create a C project so I just opened the .C file with VS. The file opened fine but did not have an option to build so I couldn't generate an .exe.
Anybody got any suggestions? I tried DevC++ but I had no luck with that.
I should probably mention that I'm using Vista so the number of programs available to me is a bit more limited.
Just out of curiosity can people suggest program for use in XP too?
I have tried to install Solaris on this laptop but it already has Vista and XP installed and said during the install process that the whole drive would have to be formatted to install Solaris? I just got a copy of Ubuntu and I'm hoping that won't result in the same situation....This is turning into a proper nightmare! Is it not possible to program in "C" on Vista or XP? Surely I've missed something....?
 
OK, so I need to make the programs run under Solaris..so that would be Linux, yes?
I tried to use VS but it won't let me compile the C code, there just isn't an option to build it seeing as it's not a project....there is no option to create a C project so I just opened the .C file with VS. The file opened fine but did not have an option to build so I couldn't generate an .exe.
Anybody got any suggestions? I tried DevC++ but I had no luck with that.
I should probably mention that I'm using Vista so the number of programs available to me is a bit more limited.
Just out of curiosity can people suggest program for use in XP too?
I have tried to install Solaris on this laptop but it already has Vista and XP installed and said during the install process that the whole drive would have to be formatted to install Solaris? I just got a copy of Ubuntu and I'm hoping that won't result in the same situation....This is turning into a proper nightmare! Is it not possible to program in "C" on Vista or XP? Surely I've missed something....?

You have to create a project in VS to actually start building things (it generates build files for you), or you can use the command line version (cl.exe I think?). I haven't used VS so this information may be wrong.

Anyway, if it's for Solaris - you should probably have Solaris to build and test on. You will run into the same issue with installing any other OS if your hard drive is already partitioned out and all the space is partitioned - you will have to resize/delete partitions to get usable space for a new OS install.

I will suggest a better alternative - use virtualization software ('better' if your machine can handle this. If it can handle Vista, it should be good enough for at least basic virtualization duties). Go download VirtualBox from www.virtualbox.org, install it into Vista or XP, and in VirtualBox you can create a new virtual machine and install Solaris into it.

I also think you should learn to build code using the command line so you don't have to be reliant on an IDE just yet.

Solaris will have GCC.
 
Back
Top