You are not logged in.

#1 2009-09-23 21:12:40

DPatel304
Member
Registered: 2009-09-22
Posts: 4

Programming in C in Arch Linux

I have installed the very basic Arch Linux install (just the terminal) and want to know how to access and compile programs in C using Arch Linux.  Thanks in advance.

Offline

#2 2009-09-23 21:18:22

deej
Member
Registered: 2008-02-08
Posts: 395

Re: Programming in C in Arch Linux

Install 'base-devel'.

Use nano or vi or vim or emacs or tea [ the list goes on ] as an editor;
off you go... this may help:

http://aplawrence.com/Linux/c_compiling_linux.html

Deej

Offline

#3 2009-09-23 21:20:01

Jamie
Member
From: United States
Registered: 2009-09-21
Posts: 107

Re: Programming in C in Arch Linux

I think when you install the "base" system you have everything you need.  Are you familiar with the GNU toolchain (GCC, make, etc.)?


Thanks,
Jamie

archlinux x86_64

Offline

#4 2009-09-23 21:23:50

DPatel304
Member
Registered: 2009-09-22
Posts: 4

Re: Programming in C in Arch Linux

Jamie wrote:

I think when you install the "base" system you have everything you need.

Ah ok, I kinda figured.  I just wasn't too sure how to access the compiler.

Jamie wrote:

Are you familiar with the GNU toolchain (GCC, make, etc.)?

I'm not, actually.

Offline

#5 2009-09-23 21:56:28

linkmaster03
Member
Registered: 2008-12-27
Posts: 269

Re: Programming in C in Arch Linux

GCC is the GNU C Compiler. The basic idea is:

gcc file.cpp

That will output your binary as a.out. To learn about its other options, type:

man gcc

Offline

#6 2009-09-23 21:58:01

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: Programming in C in Arch Linux

Jamie wrote:

I think when you install the "base" system you have everything you need.  Are you familiar with the GNU toolchain (GCC, make, etc.)?

Actually like deej said it's in base-devel not base, same as a few other things that are needed. You probably don't have base-devel installed unless you selected.

Offline

#7 2009-09-24 01:23:41

Jamie
Member
From: United States
Registered: 2009-09-21
Posts: 107

Re: Programming in C in Arch Linux

mcmillan wrote:
Jamie wrote:

I think when you install the "base" system you have everything you need.  Are you familiar with the GNU toolchain (GCC, make, etc.)?

Actually like deej said it's in base-devel not base, same as a few other things that are needed. You probably don't have base-devel installed unless you selected.

Err, you're right.  Base to me = base-devel so I just assume everyone installs base-devel like I do LOL.


Thanks,
Jamie

archlinux x86_64

Offline

#8 2009-09-24 02:32:04

hack.augusto
Member
From: Brazil
Registered: 2008-08-28
Posts: 124

Re: Programming in C in Arch Linux

I recommend you to try llvm + clang after words

Offline

#9 2009-09-24 03:06:57

MP2E
Member
Registered: 2009-09-05
Posts: 115

Re: Programming in C in Arch Linux

hack.augusto wrote:

I recommend you to try llvm + clang after words

I second this. Clang and LLVM are great programming tools(though still in development, they have reached "production" quality in the C area, or so the website says tongue)


17:23 < ConSiGno> yeah baby I release the source code with your mom every night
17:24 < ConSiGno> you could call them nightly builds if you know what I mean

Offline

#10 2009-09-24 06:03:42

Aprz
Member
From: Newark
Registered: 2008-05-28
Posts: 277

Re: Programming in C in Arch Linux

Just so you know, gcc, make, and other tools aren't available just in Arch Linux, it's available in all Linux distribution. In Arch Linux, base-devel is just the name of the group that contains a bunch of material for editing, but you don't have to use them all. If you're just starting off, you'll most likely only need gcc. Makefile is often used for much larger and complicated projects. So on... I recommend just doing pacman -S gcc for now. Don't bother with the rest until you need them.

Offline

Board footer

Powered by FluxBB