DIGIT-ARC read-only archive · snapshot: July 23, 2026

problem with c compiler in linux

16 posts · originally from https://geek.digit.in/community/threads/problem-with-c-compiler-in-linux.105829/

A
ambika Original post #1
Jan 2, 2009 at 10:08 PM
Hi all,
i am new to linux system.
I am very comfortable with TURBO C or C++........now just i m shifted to dev C++(beta version),geany etc .......in my new linux system .....i have been facing problem with these compilers ......can u guys simplly tell me whts the main difference between these two ........how to set these compilers in linux??
__________________
G
Jan 2, 2009 at 10:22 PM
google GCC
A
ambika #3
Jan 2, 2009 at 10:36 PM
google GCC
LOL.

I did googling ........... in ubuntu ,linux forum.........find that there is nothing i am doing wrong.........but i know something is going wrong .......with my compiler.:(
QwertyManiac
Jan 3, 2009 at 12:30 AM
Here's a start: *www.thinkdigit.com/forum/showthread.php?t=105755

Also, since there is no conio.h in Linux, quit using clrscr and getch functions.
A
ambika #5
Jan 3, 2009 at 12:34 AM
hey qwerty i m going to leave this forum........

everyone assign me goggling .......if i find it difficult ......and not get .....right one by googling ....then??
QwertyManiac
Jan 3, 2009 at 12:43 AM
As you wish. :p

Give a code sample to help with.
vamsi360
Jan 3, 2009 at 7:19 AM
use gcc in terminal.
cc filename.c
./a.out
Why going for IDEs when you are a newbie?
Use terminal and vi editor ......
Garbage
Garbage #9
Jan 3, 2009 at 7:37 AM
Before that, if you are using Ubuntu, then install build-essentials package by doing-
Code:
sudo apt-get install build-essentials

Then you can write your code in vi / gedit / kete as
Code:
vi filename.c
gedit filename.c
kete filename.c

After that, you can compile file using-
Code:
gcc filename.c -o filename

And now run by -
Code:
./filename

Hope, this will help. :)
vamsi360
vamsi360 #10
Jan 3, 2009 at 7:54 AM
Also, since there is no conio.h in Linux, quit using clrscr and getch functions.

To clear the screen in linux, use system calls :

Code:
#include<unistd.h>
           system("clear"); //inside any function
QwertyManiac
Jan 3, 2009 at 4:21 PM
You do know that DOS's clear and Linux's clear commands are very different? It might lead to issues based on what one's intending to do. If you want a proper window-like console system, go for ncurses.
Faun
Faun #12
Jan 3, 2009 at 4:35 PM
Before that, if you are using Ubuntu, then install build-essentials package by doing-
Then you can write your code in vi / gedit /
kete as
Code:
[COLOR=White]vi filename.c
gedit filename.c[/COLOR]
kete filename.c

:)
What is this Kete...lol:rolleyes:
vamsi360
vamsi360 #13
Jan 24, 2009 at 9:21 PM
You do know that DOS's clear and Linux's clear commands are very different? It might lead to issues based on what one's intending to do. If you want a proper window-like console system, go for ncurses.

that depends on the programmers intension dude
QwertyManiac
Jan 24, 2009 at 9:30 PM
Didn't I use the word if? And to use system("clear") is wrong, you may try it out yourself. It would not work as expected on most terminal emulators of Linux.
Liverpool_fan
Jan 24, 2009 at 9:54 PM
I think it sucks pretty much that much of new programmers are trained in anything but Turbo C++. :rolleyes:
And to add to that, they are made to use, clrscr(); gets() and void main().
Duh...
And a new programmer doesn't even understand. :(

@OP:
Look here but some tips:
*home.att.net/~jackklein/ctips01.html
vamsi360
vamsi360 #16
Jan 25, 2009 at 12:13 PM
@qwerty
if it is a problem in other emulators ok ....agreed but i really didn't find any problem with it in my tried distros list.
Have you tried Fedora Eclipse or NetBeans 6.1?