Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Code Blocks Won't work on Mac

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

Posted on Feb 4, 2013 6:58 AM

Reply
Question marked as Best reply

Posted on Jan 19, 2017 1:43 PM

I realize that this is an old post but it may help others.


I just completely uninstalled and re-installed CodeBlocks-13.12 for Mac.

I created a New Project from the File menu and clicked on the Run button.

It compiled fine but no console appeared, just like the Original Poster described!


I launched the Terminal (/Applications/Utilities/Terminal) just to make sure it worked.

That's all I did. Thereafter, CodeBlocks worked fine.


So, if you've never launched the Terminal, you apparently need to launch it once

after installing CodeBlocks for CodeBlocks to work properly. There might be an

an explanation but it seems inconvenient that it doesn't work the first time.

(Also, you need to disable two user-contributed plugins: keyboard shortcuts and

code completion.)


Hope this helps someone.

16 replies

Code Blocks Won't work on Mac

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.