Linux - NewbieThis 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.
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.
I helped archie101 in several threads here at LQ, he's using Arch and should not have any problems finding gcc (I don't indeed remember if it is installed by default ).
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855
Rep:
Write a simple c program. Then compile it using gcc -o <progname.o> <progname.c>.
You can also compile it straightaway with gcc <progname>. In this case the compiled binary name would be a.out.
You can then execute the compiled binary using ./<progname.o> or ./<a.out>.
Hope this helps.
PS: AFAIK _all_ distros come with gcc - unless you specifically did not install it. You can check that with 'whereis gcc'.
I have it installed but i do not know how to open it up and write a program. i looked on archlinux.org and did not find out how to.
I think that you are confusing a compiler with an IDE (Integrated Development Environment). A short look at the Arch repositories showed up a lot of IDEs for Arch, just try a few if you want.
i made a file put a simple c program in it saved it and ran gcc -o nameofmyprogram nameofmyprogram.c and it said gcc: error: hello.c: No such file or directory
gcc: fatal error: no input files
compilation terminated
You may use the "Go Advanced" button at the bottom of your new post, then you end up in an advanced editor where there is this # character where you can click in order to wrap code-tags around the text.
You may as well use the "quote" button for any post where someone used code-tags and see how it works.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.