1
bb2120
Compiling C in Ubuntu
  • 2006/6/21 20:56

  • bb2120

  • Not too shy to talk

  • Posts: 179

  • Since: 2005/7/6 1


I'm fairly new to Linux, but was wondering how the hell to compile a c program from the Ubuntu terminal.

I have tried
cc search.c
gcc search.c
make search.c

But I always get 'command not found'.

Could anyone enlighten me on this issue?

2
nekro
Re: Compiling C in Ubuntu
  • 2006/6/21 22:26

  • nekro

  • Quite a regular

  • Posts: 213

  • Since: 2005/11/9


you have to install any compiler...

use the synaptic or try to do

apt-get install gcc

3
bb2120
Re: Compiling C in Ubuntu
  • 2006/6/22 5:40

  • bb2120

  • Not too shy to talk

  • Posts: 179

  • Since: 2005/7/6 1


Cheers nekro

OK, I've done that, but now whenever I try to cc search.c, I get:
search.c:1:19: error: stdio.h: No such file or directory
search.c: In function ‘main’:
search.c:7: warning: incompatible implicit declaration of built-in function ‘printf’

Do I need to install the standard i/o library?
Any ideas on where I can find this among others?

4
bb2120
Re: Compiling C in Ubuntu
  • 2006/6/22 17:32

  • bb2120

  • Not too shy to talk

  • Posts: 179

  • Since: 2005/7/6 1


*bumpety bump*


Apologies for the complete lack of XOOPS relevance...

Login

Who's Online

57 user(s) are online (39 user(s) are browsing Support Forums)


Members: 0


Guests: 57


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits