Installing the CodeBlocksIDE + Hello World

I installed CodeBlocks on a MAC OSX.

Executing the HELLO WORLD program produced the following error -

-------------- Build: Debug in Hello World (compiler: GNU GCC Compiler)---------------

g++ -Wall -fexceptions -g -c “/Users/johnhokkanen/Ivan On Tech/Code Blocks/Projects/Hello World/main.cpp” -o obj/Debug/main.o
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

I would appreciate any help with this.

Thank you.

John Hokkanen

What is your code?
Is it: int main{
cout << "Hello World << endl;
return 0;
}

1 Like

Yes, that is the code :

#include

using namespace std;

int main()

{

*** cout << “Hello world!” << endl;***

*** return 0;***

}

You’ll need to reinstall the command line tools:

$ xcode-select --install

Executed command as instructed ::

206:~ johnhokkanen$ xcode-select --install
xcode-select: note: install requested for command line developer tools

Executed the code and the following was displayed in the CodeBlocks log ::

-------------- Run: Debug in Hello World (compiler: GNU GCC Compiler)---------------

Checking for existence: /Users/johnhokkanen/Ivan On Tech/Code Blocks/Projects/Hello World/bin/Debug/Hello World

Executing: osascript -e ‘tell app “Terminal”’ -e ‘activate’ -e ‘do script "/private/var/folders/9r/q09kcb117tb312g3sktj330m0000gn/T/AppTranslocation/B5780B6C-D70C-4D2B-A1E8-4B1AE693629C/d/CodeBlocks\ 2.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/johnhokkanen/Ivan\ On\ Tech/Code\ Blocks/Projects/Hello\ World/bin/Debug/Hello\ World "’ -e ‘end tell’ (in /Users/johnhokkanen/Ivan On Tech/Code Blocks/Projects/Hello World/.)

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

The following was displayed in the MAC OSX Terminal window ::

**206:~ johnhokkanen$ /private/var/folders/9r/q09kcb117tb312g3sktj330m0000gn/T/AppTranslocation/B5780B6C-D70C-4D2B-A1E8-4B1AE693629C/d/CodeBlocks 2.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/johnhokkanen/Ivan On Tech/Code Blocks/Projects/Hello World/bin/Debug/Hello World **

-bash: /private/var/folders/9r/q09kcb117tb312g3sktj330m0000gn/T/AppTranslocation/B5780B6C-D70C-4D2B-A1E8-4B1AE693629C/d/CodeBlocks: No such file or directory

Hi,
Perhaps it is best to follow up with Fillip at support@ivan.academy.com
He is the guru of guru’s

Hello, how’s it going?
I installed codeblocks, then I got the compiler going, but I did something wrong and - long story short - I uninstalled it and installed it again, and now I think I’m getting it, but not sure. Dig? D.