Code::Blocks Forums
User forums => Help => Topic started by: modeezy23 on February 16, 2019, 03:31:48 pm
-
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.
-
Try to build project in a path without spaces or non ASCII characters in it.
Tim S.
-
Try to build project in a path without spaces or non ASCII characters in it.
Tim S.
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 :-\
-
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...
-
Mostly it is not a codeblocks problem, but a compiler or operating system problem.... Codeblocks takes the paths and feeds them transparently...
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.
-
Try to build project in a path without spaces or non ASCII characters in it.
Tim S.
I am having the same issue. How exactly can the space issue be fixed? Should you adjust the file path in project settings & where is this? I’ve been trying to solve this for 2 days.
-
You have to make sure that absolute paths made for files in the project doesn't contain any non-ascii characters.