Skip to main content

Thread: Problems with C Compiler :(


i ran commands

sudo aptitude install build-essential
sudo gedit first.c

until point seems fine except when save code report:

code:
(gedit:2977): gtk-warning **: attempting store changes `/root/.local/share/recently-used.xbel', failed: failed create file '/root/.local/share/recently-used.xbel.edn36v': no such file or directory  (gedit:2977): gtk-warning **: attempting set permissions of `/root/.local/share/recently-used.xbel', failed: no such file or directory  (gedit:2977): gtk-warning **: attempting store changes `/root/.local/share/recently-used.xbel', failed: failed create file '/root/.local/share/recently-used.xbel.ke136v': no such file or directory  (gedit:2977): gtk-warning **: attempting set permissions of `/root/.local/share/recently-used.xbel', failed: no such file or directory

following rest run file results:

cc -c first.c

code:
first.c: in function ‘main’: first.c:5:7: error: expected ‘;’ before ‘{’ token

cc -o first first.c

code:
first.c: in function ‘main’: first.c:5:7: error: expected ‘;’ before ‘{’ token

./first

code:
bash: ./file: no such file or directory


output should show follows

hello, world


... not.

----

added

sudo apt-get install gcc build-essential

install gcc, have same results.

----
*notes

using ubuntu 11.10

there should no reason edit source files root rights (= drop sudo)

before can tell wrong in code must first show it. missing semicolon @ end of line.


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] Problems with C Compiler :(


Ubuntu

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account