problem in compiling C programs in Ubuntu

Asked by Spapis

Hi guys!!!
I am trying to compile C programs in Ubuntu 7.04

It is the famous "Hello World" program.

I have tried the commands "sudo aptitude install built-essential" that i used when i had a similar problem in xubuntu or
                                       "sudo apt-get install build-essential"

but the problem is not solved...

any ideas???

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Spapis (pspapis) said :
#1

the message that i receive from Linux while i am in terminal is:

hello_world.c:1:19:error:stdio.h:No such file or directory
hello_world.c:In function 'main':
hello_world.c:5: warning: implicit declaration of function 'printf'
hello_world.c:5: warning: incompatible implicit declaration of built-in function'printf'

Revision history for this message
Qwerty Maniac (qwertymaniac) said :
#2

Try this:

sudo apt-get install build-essential libc6-dev

Revision history for this message
Spapis (pspapis) said :
#3

it didn't work

E:Package build-essential has no installation candidate

Revision history for this message
Qwerty Maniac (qwertymaniac) said :
#4

Give me the contents of your /etc/apt/sources.list file

( You can open it in an editor by giving: sudo gedit /etc/apt/sources.list )

Revision history for this message
Spapis (pspapis) said :
#5

It didn't do anything...
It said command not found...

I may did a stupidity because i am a rookie...

Please provide more details...

Revision history for this message
Pedro Fragoso (ember) said :
#6

libc6-dev: /usr/include/stdio.h

stdio.h belongs to libc6-dev .

If you are using KDE do "sudo gedit /etc/apt/sources.list" . If you don't have Gedit install it from Synaptic.

Or in the Terminal write:

sudo aptitude update; sudo aptitude install build-essential"

Revision history for this message
Pedro Fragoso (ember) said :
#7

libc6-dev: /usr/include/stdio.h

stdio.h belongs to libc6-dev .

If you are using KDE do "sudo kate /etc/apt/sources.list" . If you don't have Gedit install it from Synaptic.

Or in the Terminal write:

sudo aptitude update; sudo aptitude install build-essential"

Can you help with this problem?

Provide an answer of your own, or ask Spapis for more information if necessary.

To post a message you must log in.