6 Replies Latest reply: Jun 5, 2014 6:23 PM by rmcghee
alyssabritt Level 1 Level 1 (0 points)

Okay, so I'm taking an Intro to C class and I cannot get my Code Blocks compiler to work. I've installed Command Line tools for Xcode and I also have Xcode. However, the installation for the OSX 10.7.5 software update won't seem to work. I keep getting the following message:

 

file://localhost/Users/alyssacastelli/Desktop/Screen%20Shot%202013-02-04%20at%20 9.40.36%20AM.png

 

 

I have a simple "hello world" code in Code Blocks and when I hit "build and run", all I get is this:

___________________________________________________________

gcc   -c "/Users/alyssacastelli/Desktop/C Programming Files/alyssahello.c" -o "/Users/alyssacastelli/Desktop/C Programming Files/alyssahello.o"

g++  -o "/Users/alyssacastelli/Desktop/C Programming Files/alyssahello" "/Users/alyssacastelli/Desktop/C Programming Files/alyssahello.o"  

Process terminated with status 0 (0 minute(s), 1 second(s))

0 error(s), 0 warning(s) (0 minute(s), 1 second(s))

 

Checking for existence: /Users/alyssacastelli/Desktop/C Programming Files/alyssahello

Executing: osascript -e 'tell app "Terminal"' -e 'activate' -e 'do script "/Users/alyssacastelli/Desktop/C Programming Files/alyssahello"' -e 'end tell' /Users/alyssacastelli/Downloads/CodeBlocks.app/Contents/MacOS/cb_console_runner   (in /Users/alyssacastelli/Desktop/C Programming Files)

Process terminated with status 0 (0 minute(s), 2 second(s))

____________________________________________________________

 

I've been trying to get this thing to work for years. I've taken it to my professor several times as well as a few of the other mac users in my class with no success. If someone here can figure this out, that would be great. Thanks.


MacBook Pro, Mac OS X (10.7.5), Code Blocks compiler and Xcode
  • red_menace Level 6 Level 6 (14,855 points)

    Try reposting your error screenshot - you can upload images directly to the server by clicking the camera icon in the editor toolbar, otherwise you will need a link to someplace accessible (no one will be able to see your file with that link).

  • VikingOSX Level 6 Level 6 (10,980 points)

    Update to the 2-January-2013 12.11-SP1 Code::Blocks release for OS X. Have you shared this issue on the Code::Blocks forum or with them directly? Have you tried to compile your code on another platform in Code::Blocks?

     

    You might want to post this over on the developer area in the Apple Support Community.

     

    Whatever happened to the legacy compilation sequence:

     

    gcc -O2 -o alyssahello alyssahello.c

  • etresoft Level 7 Level 7 (26,880 points)

    Google search results tell me that "Codeblocks is a cross-platform IDE built around wxWidgets, designed to be extensible and configurable. Runs on Windows and Linux"

     

    Why on earth would you ever use such a thing? Is this a requirement for the class? You don't want it.

     

    If this is a requirement for the class, you might be able to get Codeblocks from MacPorts or something. You could build it yourself, but you would have to learn a bit about Xcode and other stuff first - the catch-22 of open source.

     

    But to reiterate, you don't want to use Codeblocks for anything. It is a waste of your time. If it is required for this class, drop the class and find another one.

  • Frank Caggiano Level 7 Level 7 (25,720 points)

    I've been trying to get this thing to work for years.

    How long is this course? Has to be one of the longest running programming classes going.

  • Frank Caggiano Level 7 Level 7 (25,720 points)

    You're not getting any errors acording to the printouts you posted, both the compile and the second thing that ran exited with 0.  So what is the problem?

  • rmcghee Level 1 Level 1 (0 points)

    I've been using both CodeBlocks and Xcode on Mac for a couple of years.

    Xcode is great for developing Mac applications.

    CodeBlocks is great if you need a cross-platform IDE.

     

    I'll outline the steps I used to get it working (fairly simple).

     

    1. Get CodeBlocks version 12.11

     

    Don't go here:

    http://www.codeblocks.org/downloads  (note: 13.12 is known to have a problem on Mac).

     

    Instead, go here:

    http://sourceforge.net/projects/codeblocks/files/Binaries/12.11/

     

    Click on MacOS and get the .dmg (unless you're more  comfortable with .zip).

    Read the comments below the download options.

     

    2. After download and installation, drag CodeBlocks.app into your ~/Applications folder.

     

    3. Start CodeBlocks and disable a couple of plugins that cause problems.

     

    Click Menu->Plugins, then Plugin Manager.

    The plugins are alphabetized.  Find the following and disable them.

    command completion

    keyboard shortcuts

     

    Examining your screenshot a little closer, I suspect you may not have selected Console Application.

    You can check by clicking Menu->Project->Properties, Build targets. Find "Type:" in the

    "Selected build target options" section.  It should say "Console application".  If it doesn't,

    change it and click "OK".

     

    I don't recall having to do anything else.  Create a project (Hello world) and run.

    Please report whether this solves your problem - thanks.