User forums > Help

Cant run code on macOS

(1/2) > >>

LoneProgrammer:
Hi everyone,
I'm new to C::B and C and after digging through the forums I cant find an answer to my question despite many similar posts.
I tried to run a basic "Hello World" program after installing the latest nightly build available for macOS 10.15 (12064) but when I hit build and run the console window at the bottom of the screen shows this and C::B freezes

--- Code: ----------------- Build: Debug in test (compiler: LLVM Clang Compiler)---------------

clang -Weverything -g  -c /Users/(user_name)/Desktop/Projects/test/main.c -o obj/Debug/main.o
clang  -o bin/Debug/test obj/Debug/main.o   

--- End code ---

Even when I try to abort the build or close C::B nothing happens.
I ran this command in the terminal and was able to successfully compile and run the program, however.

--- Code: ---clang Desktop/Projects/test/main.c -o Desktop/Projects/test/main
--- End code ---
I tried changing the Command Line Macro in the Settings->Compiler->Other Settings->Advanced Options panel to what I used in the terminal but that second line in the console still shows up and C::B freezes.
Does anyone know how to fix this?

stahta01:
I think there is a known run problem under macOS.

If you just try to build (without running) does that work?

Tim S.

LoneProgrammer:
Hi Tim,
Code::Blocks freezes whether I try to build or build and run so it’s probably on the build process itself. Like I said the build command works if I write it directly into the terminal but the second command the console shows does not work and shows an error in the terminal so that may be where the problem is coming from but again I’m new to all of this.
Thanks,
LoneProgrammer

stahta01:
Do you have non ASCII characters or spaces in the CB Project path?

If yes, try building in a folder without  non ASCII characters or spaces in the path.

Edit: Also, revert your changes to advanced compiler settings.
Edit2: After revert your changes to advanced compiler settings.
  You might try unchecking "Use full paths for source file (GDB workaround)"
  That on tab "Commands" tab of advanced compiler options.

Tim S.

LoneProgrammer:
There are no non-ASCII characters or spaces in the path

Navigation

[0] Message Index

[#] Next page

Go to full version