Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-09-2006, 07:09 PM
|
#1
|
LQ Newbie
Registered: Feb 2006
Posts: 14
Rep:
|
compiling c code in SuSe 10 ?!
I just made the switch to Linux and am trying to figure out how to compile some c code that I have programmed
how can I simply compile and execute a .c file? I'm trying to test a simple hello world program but am having no luck.
I have tried in the terminal: gcc -0 helloworld hello.c
but the terminal seems to not reconize gcc command, what am I doing wrong?
Also will openGL commands work when compiling in linux?
Thanks.
|
|
|
02-09-2006, 07:21 PM
|
#2
|
Member
Registered: Jul 2005
Location: Maine, USA
Distribution: OpenSUSE, Gentoo, Fedora, Ubuntu, Mandriva, others
Posts: 413
Rep:
|
Perhaps you did not cd into the directory the hello.c file was in. It might also be helpful to give the output of the gcc command.
|
|
|
02-09-2006, 07:31 PM
|
#3
|
LQ Newbie
Registered: Feb 2006
Posts: 14
Original Poster
Rep:
|
Quote:
Originally Posted by pdeman2
Perhaps you did not cd into the directory the hello.c file was in. It might also be helpful to give the output of the gcc command.
|
michael@linux:~> ls
bin Desktop Documents My Music public_html test.c
michael@linux:~> gcc -o hello test.c
bash: gcc: command not found
michael@linux:~>
|
|
|
02-09-2006, 07:39 PM
|
#4
|
Member
Registered: Jul 2005
Location: Maine, USA
Distribution: OpenSUSE, Gentoo, Fedora, Ubuntu, Mandriva, others
Posts: 413
Rep:
|
Try typing whereis gcc and see what the output is.
|
|
|
02-09-2006, 07:40 PM
|
#5
|
Senior Member
Registered: Jun 2004
Location: Australia
Distribution: Mandriva/Slack - KDE
Posts: 1,672
Rep:
|
Maybe you need to install the compiler. That usually helps.
|
|
|
02-09-2006, 07:42 PM
|
#6
|
LQ Newbie
Registered: Feb 2006
Posts: 14
Original Poster
Rep:
|
Quote:
Originally Posted by amosf
Maybe you need to install the compiler. That usually helps.
|
im a complete noob, how do I do that?
|
|
|
02-09-2006, 07:43 PM
|
#7
|
LQ Newbie
Registered: Feb 2006
Posts: 14
Original Poster
Rep:
|
Quote:
Originally Posted by pdeman2
Try typing whereis gcc and see what the output is.
|
michael@linux:~> whereis gcc
gcc: /usr/lib/gcc
michael@linux:~>
|
|
|
02-09-2006, 07:58 PM
|
#8
|
Senior Member
Registered: Jun 2004
Location: Australia
Distribution: Mandriva/Slack - KDE
Posts: 1,672
Rep:
|
you'll need to use yast and install the compiler and development apps...
|
|
|
All times are GMT -5. The time now is 11:57 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|