Which C++ and Java Compiler

Gamingphreek

Lifer
Mar 31, 2003
11,679
0
81
I am taking my C++ and Java courses in College in pursuit of a CS major. I don't know what we will be using for Java; however, for C++ we used Microsoft Visual Studio 2005. What is the best compiler and program for each respective language in Ubuntu 7.10

-Kevin
 

Gamingphreek

Lifer
Mar 31, 2003
11,679
0
81
Ok-- I am still learning Linux. Where do I go to begin writing a program in GCC? I tried searching for a help file, but there is nothing out there.

-Kevin

Edit: Yes it is installed, and installed the Build-Essential package
 

mundane

Diamond Member
Jun 7, 2002
5,603
8
81
Actually, you might want an IDE for C++, it depends on how your professor is going to teach. Some work with the IDE tools, while others make you start from the command line and Makefiles. Since you're using Visual Studio, it's likely they'll have you rely on the IDE - for Linux, you can get dev-C++, Eclipse, and others.
Also, they might be doing some Window-specific programming. If so, and you're stuck with Linux, you'll need to investigate virtualization.
 

Gamingphreek

Lifer
Mar 31, 2003
11,679
0
81
I have run Virtual Machines in Windows before but never in Linux. The only Window specific programming I can think of so far is the CTRL-C Break command that we used. What C++ IDE would guys say is the best. I toyed with dev-C++ at one point long ago but I have no knowledge of the others.

-Kevin
 

phantom404

Golden Member
Nov 2, 2004
1,460
2
81
I have virtualbox installed in linux and through there windows xp. I just installed visual studio 2k5 on it and it works great. If doing it in linux all I've messed with is emacs(text ed) and gcc, all via command line. Let me know if you decide to use a IDE and which one u liked best...i might try the same
 

silverpig

Lifer
Jul 29, 2001
27,703
12
81
The limited amount of coding I've done has almost always been done in emacs or gedit.
 

Gamingphreek

Lifer
Mar 31, 2003
11,679
0
81
Well let me ask this. In higher level programming classes will they switch from Visual Studio 2005 to a cmd line based compiler? Mainly what I am getting at, is it beneficial for me to learn both ways? If so, can someone point me in the right direction to learn and get experience with GCC?

-Kevin
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
There's nothing stopping you from using the VC++ compiler, nmake, etc from the cli if you want so it's definitely possible they will cover that. I'd probably question the class' quality if they don't.

If so, can someone point me in the right direction to learn and get experience with GCC?

Create a C or C++ file in any editor you want then run 'gcc -o blah blah.c' and it'll compile blah.c into an executable named blah. What you probably really want is an introduction to make files, gdb and/or whatever IDE you choose to use with gcc.
 

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
Originally posted by: Gamingphreek
Well let me ask this. In higher level programming classes will they switch from Visual Studio 2005 to a cmd line based compiler? Mainly what I am getting at, is it beneficial for me to learn both ways? If so, can someone point me in the right direction to learn and get experience with GCC?

-Kevin

I think you are misundertanding what GCC does. You don't "program in" gcc. You write your program in something else and then compile it with gcc. You could program in IDEs such as Visual Studio or Eclipse, save your files, and then compile those files with gcc if you wanted to, but you can't use gcc in any way to actually write your program.

When you write code in Visual Studio, you are just writing lines of text, right? Well, you could write those same lines of text in notepad, save the text file, then compile the text file with gcc to pop out an executable. IDEs just combine those steps into one button and one interface.

In fact, back when I was taking C++ in college, I used to write my programs in notepad on my own computer, then take those files to a school computer and use Visual Studio to compile them (I didn't know about free compilers like gcc back then, and the internet was virtually unheard of).
 

DarkThinker

Platinum Member
Mar 17, 2007
2,822
0
0
Your friends are : GCC and a Text editor (my choice is GCC & VIM)
For slightly big projects I like using Eclipse and GCC