News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

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

Started by modeezy23, February 16, 2019, 03:31:48 PM

Previous topic - Next topic

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.

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Agus Hardiman

#2
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.
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

#3
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...
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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

noahguyblog

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.

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. 

oBFusCATed

You have to make sure that absolute paths made for files in the project doesn't contain any non-ascii characters.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]