Code::Blocks Forums
User forums => Help => Topic started by: dboo on October 11, 2015, 02:20:09 am
-
Hey everyone,
I am a beginner in C programming and downloaded CodeBlocks 13.12 for Mac.
I am reading "C programming" by Greg Perry and Dean Miller.
In the book we are supposed to download CodeBlocks, select "File" > "New" > "Empty File"
From here we write a line of code and then Build it. I save the file first, and then Run the program.
Below are screenshots of the output I receive. I seek help from the more experienced users here.
I have Xcode 7 on my mac, I also downloaded
Command_Line_Tools_OS_X_10.10_for_Xcode_7.dmg on my computer as well. I only downloaded Command Line Tools because I've watched several videos on youtube/google and I guess this was one of the things that could do the trick.
I would really love to continue the book and learn C programming and do not have the knowledge to surpass this small barrier.
All help is appreciated!
-
Heads up to anyone looking at this as well. I saw this on the FAQ:
Q: My build fails in the compile/link/run step with a Permission denied error?
A: There are several possible causes for this:
The output directory does not have read/write access.
Either change control settings on the output directory, or move the project to different location.
A previous instance of the executable failed to terminate properly.
Open your system's equivalent of Process/Task Manager, search the list for the name of the executable Code::Blocks is trying to output, and terminate it.
Logging off or rebooting will achieve the same effect.
The executable is open.
If the executable is open in a hex-editor or actively being run, close it.
Security software is interfering.
The target file is locked while an antivirus programming is scanning it; either wait a few seconds for the antivirus scan to finish, set an exception in the antivirus settings, or (temporarily) disable the antivirus program.
Firewalls with very strict settings sometimes block execution; try reducing the firewall's settings or adding an exception.
Switching security software may have left traces behind that are interfering; hunt down the remnants of the old antivirus/firewall software and remove them.
The file/library cannot be found.
Double check all of the compiler and linker search directories (including any variables they may be using) are properly setup.
Code::Blocks was improperly installed.
Mixing binaries from a stable release and a nightly build (or even two different nightly builds) is highly likely to cause a slew of problems; reinstall Code::Blocks in an empty directory.
Multiple installed compilers are interfering with each other.
If they are not required to keep, completely remove all but the most used compiler.
If several compilers are required, ensure that none of them are in the system path (this is so that Code::Blocks will be able to manage all paths).
Also, do not place any compilers in their default installation path (for example C:\MinGW), as some compilers are hard-coded to look for headers in a default path before searching their own respective directories."
- The very first line says "Change settings on the output directory" - I'm not even sure how to do this.
- My Firewall settings are turned off so that can't be the case of blocking execution.
- In settings: My compiler is set at GNU GCC compiler
Any other thoughts?
-
i don't know how the default access rights for the user folders on recent MacOSX are.
But one thing: you also have to chose a valid extension for a file when saving it, in your case most likely cpp and I suggest to give the file a more meaningful name.
-
Okay I will try a few more things here to get this working, I will keep you posted on results