User forums > Help

CAN'T RUN ON MAC..HELP!!!

(1/2) > >>

modeezy23:
I'm new to programming and a currently learning C programming.
I installed Xcode and code blocks onto my mac. I'm trying to run the hello world code but its giving me this:

THIS ON CODE BLOCKS:

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

Checking for existence: /Users/msenador/Desktop/Hello World/bin/Debug/Hello World
Executing: osascript -e 'tell app "Terminal"' -e 'activate' -e 'do script "/Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/msenador/Desktop/Hello\ World/bin/Debug/Hello\ World "' -e 'end tell'  (in /Users/msenador/Desktop/Hello World/.)
Process terminated with status 0 (0 minute(s), 2 second(s))
 

AND THIS ON MY TERMINAL WHENEVER I TRY TO RUN IT:

/Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/msenador/Desktop/Hello World/bin/Debug/Hello World
Morians-MacBook-Pro:~ msenador$ /Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/msenador/Desktop/Hello World/bin/Debug/Hello World
sh: /Users/msenador/Desktop/Hello: No such file or directory

Process returned 127 (0x7F)   execution time : 0.006 s
Press ENTER to continue.

stahta01:
Try to build project in a path without spaces or non ASCII characters in it.

Tim S.

Agus Hardiman:

--- Quote from: stahta01 on February 16, 2019, 03:51:44 pm ---Try to build project in a path without spaces or non ASCII characters in it.

Tim S.

--- End quote ---
Thanks, I choose on my Mac a folder which has no space and it solved my problem like the OP problems !

Btw strange that in this 2019 year, CodeBlocks don't know how to interpret folder with spaces  ???
I can't even give my project name with spaces or it will be a problem like the OP  :-\

BlueHazzard:
Mostly it is not a codeblocks problem, but a compiler or operating system problem.... Codeblocks takes the paths and feeds them transparently...
We probably have to introduce escaping, but honestly spaces and non ascii charachters are a bad choose for paths, because they are not the same on every operating system (encoding), or are used to separate parameters (spaces)....
So the easiest and 100% secure way is to use "_" instead of spaces and use ascii characters for paths...

oBFusCATed:

--- Quote from: BlueHazzard on February 24, 2019, 08:18:11 pm ---Mostly it is not a codeblocks problem, but a compiler or operating system problem.... Codeblocks takes the paths and feeds them transparently...

--- End quote ---
This statement is wrong. If the user has specified something that is valid on his system and C::B fails to obey and do the right thing then it is 100% C::B's fault.

In this case this is 100% true also. The way launching a console has changed and we don't do the right thing. This needs to be fixed, for example CodeLite works correctly in this case I think.

Navigation

[0] Message Index

[#] Next page

Go to full version