Click to See Complete Forum and Search --> : Compilers? Debuggers? Environments? for Linux
digitalzero
01-18-2001, 04:07 PM
I bought myself the book: "Accelerated ANSI C++" and I cant wait to start it. However I dunno which compiler and debugger I should download. I just want to write up code with an editor and then debug it, and then compile it to test it. Can I do this in C++. This is all coming from a person who previously used the Java Development Kit 1.2.2 (JDK). Where I used "javac" to compile. I know it's C++ is different to this, but can anyone suggest a C++ development environment? or a C++ debugger and compiler?
Thanks for the help all!
Strike
01-18-2001, 05:33 PM
Compiler - gcc
Debugger - gdb, or ddd for a nice GUI
Environment - vim and Makefiles http://www.linuxnewbie.org/ubb/smile.gif
Sterling
01-18-2001, 07:30 PM
Be sure to learn automake and autoconf at some point. They make creating software packages for distribution much easier - once you work out what you're doing with them. http://www.linuxnewbie.org/ubb/wink.gif Strike's suggestions for software are what I'd suggest, although I'd suggest checking out Joe if you're used to Borland's IDEs.
------------------
-Sterling
"There is no Linuxnewbie.org cabal..."
f'lar
01-18-2001, 09:22 PM
IDE: kdevelop, and this summer borland's version should come out.
compiler: gcc (it's problably already installed).
debugger: gdb, the one that kdevelop uses doesn't work all the time.
digitalzero
01-19-2001, 12:25 AM
I thought gcc was a c compiler. Well I guess it can also do C++ as well. Do I need to configure it so that it compiles C++ programs?
klamath
01-19-2001, 01:02 AM
No, you don't need to configure it. gcc is a collection of compilers; it does C, C++, Fortran, Objective C, and some more.
------------------
- Klamath
Get my GnuPG Key Here (http://klamath.dyndns.org/mykey.asc)
Looking for an open source project to contribute to? Check out the Better Bulletin Board (http://bbb.sourceforge.net)
prince_kenshi
01-19-2001, 05:10 AM
Well that makes me curious. How does gcc know what type of file it is? Does it go by the extension or something in the file or does it have some magical method of doing it? I could use it for assembler if it supports that language.
------------------
Prince Kenshi
Son of Bahamut
klamath
01-19-2001, 11:24 AM
See `info gcc`
It does some filetype detection by using the file's extension. I believe, by default it only supports C, C++, and assembler, which are easy to detect. You can install frontends which understand FORTRAN and others -- but I've never used them.
I believe gcc should work with assembler. If not, just run gas by hand.
------------------
- Klamath
Get my GnuPG Key Here (http://klamath.dyndns.org/mykey.asc)
Looking for an open source project to contribute to? Check out the Better Bulletin Board (http://bbb.sourceforge.net)
digitalzero
01-19-2001, 02:38 PM
ok thanks all for the help. I'm going to learn up asap!
Sterling
01-20-2001, 10:25 AM
One can also pass flags to gcc to tell it what specific compiler to use. Many systems provide g++ as a quick way to pass a bunch of C++ specific flags. So instead of:
gcc file.c -o file
You'd have:
g++ file.C -o file
Some systems also have c++ as an alias for gcc's c++ compiler, but I don't know how portable this is.
------------------
-Sterling
"There is no Linuxnewbie.org cabal..."