Compiling

Write here if you have problems with your C++ source code

Moderator: Board moderators

Post Reply
asif_rahman0
Experienced poster
Posts: 209
Joined: Sun Jan 16, 2005 6:22 pm

Compiling

Post by asif_rahman0 »

How to compile in linux(text mode not in GUI) the C/C++ program?
Can someone tell me the approach?

help would be appreciated!
-------
rabbi
sumankar
A great helper
Posts: 286
Joined: Tue Mar 25, 2003 8:36 am
Location: calcutta
Contact:

Post by sumankar »

If you have GNU Compiler collection installed on your system, you can use
the following command lines:

Code: Select all

gcc filename.c
for C code and

Code: Select all

g++ filename.c
for C++.
asif_rahman0
Experienced poster
Posts: 209
Joined: Sun Jan 16, 2005 6:22 pm

Post by asif_rahman0 »

thnx sumankar.
asif_rahman0
Experienced poster
Posts: 209
Joined: Sun Jan 16, 2005 6:22 pm

Post by asif_rahman0 »

Now i want to know how to debug the C/C++ code in linux compiler?

Need help.
------
rabbi
Krzysztof Duleba
Guru
Posts: 584
Joined: Thu Jun 19, 2003 3:48 am
Location: Sanok, Poland
Contact:

Post by Krzysztof Duleba »

google for it.
Moha
Experienced poster
Posts: 216
Joined: Tue Aug 31, 2004 1:02 am
Location: Tehran
Contact:

Post by Moha »

Use gdb for debuging, it is a very powerful debugger in the linux environment. You should have some practice with it to use it for debugging linux programs. Nevertheless, you can use the ddd, which is a debugger that has a gui(actually it is gdb with GUI).
asif_rahman0
Experienced poster
Posts: 209
Joined: Sun Jan 16, 2005 6:22 pm

Post by asif_rahman0 »

thnx Moha.
Post Reply

Return to “C++”