Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 02-01-2009, 10:08 PM   #1 (permalink)
learnhardy
 
Join Date: Oct 2008
Posts: 104
Unhappy problem with c compiler in linux


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??
__________________
__________________
Newbie......
celebrate an ancient art .....
http://ambika.99k.org
ambika is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 02-01-2009, 10:22 PM   #2 (permalink)
Section Moderator
 
gopi_vbboy's Avatar
 
Join Date: Mar 2007
Location: Hyderabad
Posts: 1,186
Default Re: problem with c compiler in linux

google GCC
gopi_vbboy is online now  
Old 02-01-2009, 10:36 PM   #3 (permalink)
learnhardy
 
Join Date: Oct 2008
Posts: 104
Unhappy Re: problem with c compiler in linux

Quote:
Originally Posted by gopi_vbboy View Post
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.
__________________
Newbie......
celebrate an ancient art .....
http://ambika.99k.org

Last edited by ambika; 02-01-2009 at 11:15 PM. Reason: Automerged Doublepost
ambika is offline  
Old 03-01-2009, 12:30 AM   #4 (permalink)
Commander in Chief
 
QwertyManiac's Avatar
 
Join Date: Jul 2005
Posts: 6,658
Default Re: problem with c compiler in linux

Here's a start: C++ in knoppix

Also, since there is no conio.h in Linux, quit using clrscr and getch functions.
__________________
Harsh J
www.harshj.com
QwertyManiac is offline  
Old 03-01-2009, 12:34 AM   #5 (permalink)
learnhardy
 
Join Date: Oct 2008
Posts: 104
Default Re: problem with c compiler in linux

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??
__________________
Newbie......
celebrate an ancient art .....
http://ambika.99k.org

Last edited by ambika; 03-01-2009 at 12:37 AM. Reason: Automerged Doublepost
ambika is offline  
Old 03-01-2009, 12:43 AM   #6 (permalink)
Commander in Chief
 
QwertyManiac's Avatar
 
Join Date: Jul 2005
Posts: 6,658
Default Re: problem with c compiler in linux

As you wish.

Give a code sample to help with.
__________________
Harsh J
www.harshj.com
QwertyManiac is offline  
Old 03-01-2009, 01:07 AM   #7 (permalink)
learnhardy
 
Join Date: Oct 2008
Posts: 104
Default Re: problem with c compiler in linux

Quote:
Originally Posted by QwertyManiac View Post
As you wish.

Give a code sample to help with.
u r laughing ?? ......
__________________
Newbie......
celebrate an ancient art .....
http://ambika.99k.org
ambika is offline  
Old 03-01-2009, 07:19 AM   #8 (permalink)
Always confused
 
vamsi360's Avatar
 
Join Date: May 2008
Location: Mandriva Control Center
Posts: 349
Default Re: problem with c compiler in linux

use gcc in terminal.
cc filename.c
./a.out
Why going for IDEs when you are a newbie?
Use terminal and vi editor ......
__________________
Vamsi Subhash
visit my blog at www.vamsisubhash.co.cc and taste a bit of IT!
vamsi360 is offline  
Old 03-01-2009, 07:37 AM   #9 (permalink)
God of Mistakes...
 
Garbage's Avatar
 
Join Date: Dec 2005
Location: Pune, Maharashtra
Posts: 1,923
Default Re: problem with c compiler in linux

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.
__________________
Registered Linux User #468778
----------------------------------
http://twitter.com/_Garbage_
Garbage is offline  
Old 03-01-2009, 07:54 AM   #10 (permalink)
Always confused
 
vamsi360's Avatar
 
Join Date: May 2008
Location: Mandriva Control Center
Posts: 349
Smile Re: problem with c compiler in linux

Quote:
Originally Posted by QwertyManiac View Post
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
__________________
Vamsi Subhash
visit my blog at www.vamsisubhash.co.cc and taste a bit of IT!
vamsi360 is offline  
Old 03-01-2009, 04:21 PM   #11 (permalink)
Commander in Chief
 
QwertyManiac's Avatar
 
Join Date: Jul 2005
Posts: 6,658
Default Re: problem with c compiler in linux

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.
__________________
Harsh J
www.harshj.com
QwertyManiac is offline  
Old 03-01-2009, 04:35 PM   #12 (permalink)
Wahahaha~!
 
Faun's Avatar
 
Join Date: Dec 2006
Location: Pune/there
Posts: 7,676
Default Re: problem with c compiler in linux

Quote:
Originally Posted by Garbage View Post
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:
vi filename.c
gedit filename.c
kete filename.c

What is this Kete...lol
__________________
Blog | Flickr | Battlelog
Spoiler:
Asus Z68 V-Pro|i5 2500k|TRUE Black|Ripjaws X|U2311H|N560GTX|D7000|XONAR STX|RE272|RE0|CC51|XE200PRO Walnut| TD II V2| Ultraphile|N5800

Mono
Faun is offline  
Old 24-01-2009, 09:21 PM   #13 (permalink)
Always confused
 
vamsi360's Avatar
 
Join Date: May 2008
Location: Mandriva Control Center
Posts: 349
Smile Re: problem with c compiler in linux

Quote:
Originally Posted by QwertyManiac View Post
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
__________________
Vamsi Subhash
visit my blog at www.vamsisubhash.co.cc and taste a bit of IT!
vamsi360 is offline  
Old 24-01-2009, 09:30 PM   #14 (permalink)
Commander in Chief
 
QwertyManiac's Avatar
 
Join Date: Jul 2005
Posts: 6,658
Default Re: problem with c compiler in linux

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.
__________________
Harsh J
www.harshj.com
QwertyManiac is offline  
Old 24-01-2009, 09:54 PM   #15 (permalink)
Sami Hyypiä, LFC legend
 
Liverpool_fan's Avatar
 
Join Date: Jun 2007
Location: Нью-Дели
Posts: 2,138
Default Re: problem with c compiler in linux

I think it sucks pretty much that much of new programmers are trained in anything but Turbo C++.
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:
http://home.att.net/~jackklein/ctips01.html
__________________
Experience true education in Computer Science - http://www.udacity.com | http://www.coursera.org

Spoiler:
Read before asking / messaging any moderator for any query: FAQ + answers for new members

Read all the sticky threads before asking any type of query. Most basic questions are answered in those.
Don't use forum for chatting. Visit http://webchat.freenode.net/?channels=krow, enter nick and connect.
Liverpool_fan is offline  
Old 25-01-2009, 12:13 PM   #16 (permalink)
Always confused
 
vamsi360's Avatar
 
Join Date: May 2008
Location: Mandriva Control Center
Posts: 349
Default Re: problem with c compiler in linux

@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?
__________________
Vamsi Subhash
visit my blog at www.vamsisubhash.co.cc and taste a bit of IT!
vamsi360 is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sugest me a java compiler in linux voggu Programming 3 23-03-2008 06:26 PM
Suggest a decent C compiler please(Linux)! baccilus Programming 26 19-03-2008 11:48 AM
problem with my compiler in vista imran asad Software Q&A 1 02-09-2007 12:38 PM
C++ compiler problem phreak0ut Software Q&A 10 25-07-2006 09:32 AM
[Wanted] Basic Compiler for gnu/Linux desertwind Open Source 7 15-12-2005 02:42 PM

 
Latest Threads
- by gforz
- by soumya
- by Sujeet
- by icebags
- by Charan

Advertisement




All times are GMT +5.5. The time now is 03:04 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2