Author Topic: Can't Run C Code MacOS Terminal  (Read 2713 times)

Offline jackNewport

  • Single posting newcomer
  • *
  • Posts: 1
Can't Run C Code MacOS Terminal
« on: January 20, 2022, 03:51:34 pm »
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/ DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /filePath '

conmputer:~ user$ '/Applications/ DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /filePath/bin/Debug/firstCDocument '

-bash: /Applications/ 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!

Offline jordi

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: Can't Run C Code MacOS Terminal
« Reply #1 on: January 20, 2022, 07:24:44 pm »
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/ /filePath/bin/Debug/firstCDocument
cb_console_runner expects an executable file as first argument