Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: yczo on August 30, 2012, 04:19:54 pm
-
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
-
Keep the sources in a folder where you have read and write access (normally below your home-folder) and all should work well.
-
hello jens.
I did it, but i can't compile. codeblocks say : gcc-config: error: could not run/locate 'gcc'
regards
-
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]
-
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
-
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.
-
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.