News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Can't Run C Code MacOS Terminal

Started by jackNewport, January 20, 2022, 03:51:34 PM

Previous topic - Next topic

jackNewport

This is the first time that I have tried to use Code::blocks, and when I try to run a simple C script (just hello world) I get this error in the Mac Terminal:
'/Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /filePath '

conmputer:~ user$ '/Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /filePath/bin/Debug/firstCDocument '

-bash: /Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /filePath/bin/Debug/firstCDocument : No such file or directory

I have a feeling that this is a dumb mistake that is easily fixed, but I'm having trouble finding an answer. Thanks!

jordi

From cb_console_runner man page:
"cb_console_runner  is part of the Code::Blocks IDE. It is used to launch console programs and wait for them to finish.  When the console program is finished, cb_console_runner displays "Press ENTER to continue".
It doesn't have any sense to use it in a terminal.
You could try:
/Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner /filePath/bin/Debug/firstCDocument
cb_console_runner expects an executable file as first argument