Author Topic: Console does not display on Mac when running C code  (Read 3208 times)

tjmulinazzi

  • Guest
Console does not display on Mac when running C code
« on: June 22, 2022, 04:42:38 am »
I am new to C and when I try to just run hello world my terminal pops up and says:

'/Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/trajan/Desktop/test/bin/Debug/test '
trajan@Trajans-MacBook-Air ~ % '/Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/trajan/Desktop/test/bin/Debug/test '
zsh: no such file or directory: /Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/trajan/Desktop/test/bin/Debug/test

How can I get the console to pop up or what am I doing wrong?
Please help. Thanks!

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: Console does not display on Mac when running C code
« Reply #1 on: June 22, 2022, 06:06:40 am »
Nothing you are doing is wrong as I can reproduce the issue.
Unfortunately at this point in time I cannot help as C++ source level debugging on the MacOS using GDB is not easy to get working due to Apple security changes a few releases ago and I have not successfully got GDB to work.

Offline xtie8319

  • Single posting newcomer
  • *
  • Posts: 2
Re: Console does not display on Mac when running C code
« Reply #2 on: October 05, 2022, 12:23:46 am »
I have the same error when running the code on MACOS Big Sur. :(


-------------- Build: Debug in C (compiler: GNU GCC Compiler)---------------

gcc -Wall -g  -c /Users/Caroline/Desktop/C:C++/C/main.c -o obj/Debug/main.o
g++  -o bin/Debug/C obj/Debug/main.o   
Output file is bin/Debug/C with size 48.49 KB
Process terminated with status 0 (0 minute(s), 1 second(s))
0 error(s), 0 warning(s) (0 minute(s), 1 second(s))
 

-------------- Run: Debug in C (compiler: GNU GCC Compiler)---------------

Checking for existence: /Users/Caroline/Desktop/C:C++/C/bin/Debug/C
Executing: osascript -e 'tell app "Terminal"' -e 'activate' -e 'do script quoted form of "/Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/Caroline/Desktop/C:C++/C/bin/Debug/C "' -e 'end tell'  (in /Users/Caroline/Desktop/C:C++/C/.)
Process terminated with status 0 (0 minute(s), 0 second(s))
 
« Last Edit: October 05, 2022, 12:25:21 am by xtie8319 »

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: Console does not display on Mac when running C code
« Reply #3 on: October 05, 2022, 02:25:33 am »
Please install the latest nighty as the issue is fixed in it.

Offline xtie8319

  • Single posting newcomer
  • *
  • Posts: 2
Re: Console does not display on Mac when running C code
« Reply #4 on: October 06, 2022, 12:15:44 am »
The issue is fixed. I am using MAC OS Big Sur.
I followed the tutorial from this guy on YT.
https://www.youtube.com/watch?v=knkAQY9JT-0