Author Topic: How can I use codeblocks like a normal user in linux? (Can't compile with gcc)  (Read 5041 times)

Offline yczo

  • Single posting newcomer
  • *
  • Posts: 8
Hello.

I can't use codeblocks without being root (well realy I can't compile with gcc). I know that this is dangerous. Would be someone so kind to tell me what must I do to use it like a normal user to start to learn c/c++?

Thanks in advance

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Keep the sources in a folder where you have read and write access (normally below your home-folder) and all should work well.

Offline yczo

  • Single posting newcomer
  • *
  • Posts: 8
hello jens.

I did it, but i can't compile. codeblocks say : gcc-config: error: could not run/locate 'gcc'

regards


Offline const451

  • Multiple posting newcomer
  • *
  • Posts: 37
Open the terminal, navigate to the folder where you source code is, and try to compile from the command line, tell us what happens.

g++ [source files]

Offline yczo

  • Single posting newcomer
  • *
  • Posts: 8
Hi const451, that was a good idea

$ gcc -o counter.c
gcc-config: error: could not run/locate 'gcc'

Is not a problem of codeblocks.

$ ls -l  //I'm enigma, I'm allowed
-rwxr-xr-x 1 enigma enigma  733 dic 22  2011 counter.c

And on father directory

drwxr-xr-x 5 enigma enigma 4096 sep  7 22:11 example

regards

Offline Radek

  • Multiple posting newcomer
  • *
  • Posts: 104
The problem concerns your gcc. Either you do not have gcc at all (if you can compile as a root, then you have gcc) or access rights to your gcc do not allow you a user access.

(1) check access rights of files concerning gcc.
(2) check access rights of directories that "leads" to gcc.

You need 'r' and 'x' everywhere. You can see your progress by attempting compiling counter.c from the commandline. When you reach success, try Code Blocks again.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Did you ever search the web for the error ?

It seems to be a more or less common problem, that can happen on gentoo after updates.