Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: yczo on August 30, 2012, 04:19:54 pm

Title: How can I use codeblocks like a normal user in linux? (Can't compile with gcc)
Post 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
Title: Re: How can I use codeblocks like a normal user in linux? (Can't compile with gcc)
Post by: Jenna on August 30, 2012, 06:31:05 pm
Keep the sources in a folder where you have read and write access (normally below your home-folder) and all should work well.
Title: Re: How can I use codeblocks like a normal user in linux? (Can't compile with gcc)
Post by: yczo on September 04, 2012, 07:40:51 pm
hello jens.

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

regards

Title: Re: How can I use codeblocks like a normal user in linux? (Can't compile with gcc)
Post by: const451 on September 04, 2012, 07:46:53 pm
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]
Title: Re: How can I use codeblocks like a normal user in linux? (Can't compile with gcc)
Post by: yczo on September 07, 2012, 10:19:39 pm
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
Title: Re: How can I use codeblocks like a normal user in linux? (Can't compile with gcc)
Post by: Radek on September 08, 2012, 08:04:21 am
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.
Title: Re: How can I use codeblocks like a normal user in linux? (Can't compile with gcc)
Post by: Jenna on September 08, 2012, 08:11:06 am
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.