Help with Compiling and what's a good application to program with?
Hi I was wondering whats a good program to program with? I am mainling dealing with C++ files, but I am about to learn C.
I currently have nedit, but I am not too sure how to compile files with Linux either. I have only developed applications in Windows, so I am pretty much lost. I am trying to compile the following code. FileName: test.cpp Code:
#include <iostream> Code:
g++ test.cpp |
hint:
use make in built rules for simple stuff 'make test' see what you get |
another hint:
Code:
using namespace std; |
and - you probably have got output.
look for a file a.out which is the default output file name for the compiler. (don't ask me why!) using make like I mentioned earlier will fix this behaviour. say you have Code:
file_name.c |
Quote:
|
cheers for the info!
How long does it take before one's brain becomes full up? |
Quote:
|
So the way I was doing it (g++ <filename>) isn't the way to compile C++ files?
Also, what applications do you guys use when writing code? |
Quote:
When your code is growing (multiple source files, dependancies, hierarchies, libraries, ...), you'll find that calling the compiler on the command line start to be a burden, and using a Makefile or an IDE greatly simplify the process. Quote:
|
Jilliagre is correct.
I think 99% of the time people use make. (it easier to type 'make test' than 'gcc test.o -o test' :-) I just use a few standard Makefile templates which I copy where I need them. make is worth getting to know though it can be very (VERY) frustrating to get familiar with it! editor, I use vi! |
If you got the 'vi' type route, try vim (vi Improved). Free to download :-)
Has syntax highlighting amongst other goodies.. |
elvis is also open source, free to download, has syntax coloring, plus: has man-page and html modes (à la linx) and is more compatible with the standard vi.
|
All times are GMT -5. The time now is 05:56 PM. |