Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: code::blocks build and run error

  1. #11
    Join Date
    Nov 2008
    Beans
    3

    Re: code::blocks build and run error

    Quote Originally Posted by chinchillart View Post
    Just installed Code::Blocks IDE 8.02 on Ubuntu 8.04.1.

    Same problem.

    After some trial-errors, I'v found a solution.

    I've place the standard code::blocks dir for project in my home:

    /home/rob/CB

    Here I'll save all my C/C++ projects.

    Now make executable the cb_console_runner for all users:

    Code:
    rob@ubuntu:~$ sudo chmod a+x /usr/bin/cb_console_runner
    Finally, I've changed the settings in Code::Blocks like this:



    Code:
    Shell to run commands in: [ /bin/bash -c ]
    Terminal to launch console program: [ xterm -T $TITLE -e ]
    Now it works!

    Rob
    I just did this and Code::Blocks is working!!! One thing though, my .cpp files will build and run even if they are not in the project directory of C::B... I did what was stated here, added execution parameters to the projects directory, and also... I feel stupid to admit this... But I installed G++... Perhaps anyone of you guys didn't install it first as me

  2. #12
    Join Date
    Aug 2006
    Location
    vietnam
    Beans
    3
    Distro
    Ubuntu 6.06

    Re: code::blocks build and run error

    I got Code::Blocks working by doing these steps:
    Code:
    $ sudo chmod a+x /usr/bin/cb_console_runner
    $ sudo apt-get install xterm
    Hope this help

  3. #13
    Join Date
    Feb 2010
    Beans
    1

    Re: code::blocks build and run error

    Be sure to save the file as .cpp when I did this things started working.....

    Bongo264

    bongounderground.com

  4. #14
    Join Date
    Aug 2010
    Location
    INDIA
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: code::blocks build and run error

    Quote Originally Posted by dwhitney67 View Post
    After you compile/link your program, verify that the resulting executable is indeed an executable.
    Code:
    $ ls -l a.out
    -rwxrwxr-x 1 dwhitney dwhitney 4742 2008-08-22 17:01 a.out
    The other thing is to try running the program such as:
    Code:
    ./a.out
    Some *nix systems do not include './' in the PATH environment setting as a security precaution.
    hi dwhitney..
    i checked and there is no a.out file there in the folder even after compilation.
    to be more precise build log section is showing the message "Nothing to be done".
    i don't know what does it mean. please help me. thanks

  5. #15
    Join Date
    Aug 2012
    Beans
    1

    Re: code::blocks build and run error

    everytime i try to build the program it show this in xterm:

    Code:
    sh:1: /home/user/CB/hello: Permission denied
    
    Process returned 126 (0x7E)      execution time: 0.002 s
    Press ENTER to continue
    This is the code:

    Code:
    #include <iostream>
    using namespace std;
    int main(){
        cout<<"Hello World";
        cin.get();
        return 0;
    }
    and the build log:
    Code:
    Nothing to be done.
    
    Checking for existence: /home/user/CB/hello
    Executing: xterm -T '/home/user/CB/hello' -e /usr/bin/cb_console_runner "/home/user/CB/hello" (in /home/user/CB)
    I have already installed the gcc and done the
    chmod a+x /usr/bin/cb_console_runner
    but I still couldnt find the settings that chinchillart used

    hope you can help me
    thanks!

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •