User forums > Using Code::Blocks

10.05 and Mac OS X 10.6.4 - Program won't run with spaces in path

(1/3) > >>

gamradtk:
I am new to Mac and I am even newer to Code::Blocks

When I select Build & Run I get the following message in the Build Log window:

Checking for existence: /Volumes/KAG HDB/Classes/test
Executing: osascript -e 'tell app "Terminal"' -e 'activate' -e 'do script "/Volumes/KAG HDB/Classes/test"' -e 'end tell'  (in /Volumes/KAG HDB/Classes)
Process terminated with status 0 (-6292 minutes, -20 seconds)
 
When the terminal window pops up I get the following message:

Last login: Mon Sep  6 19:01:21 on ttys000
/Volumes/KAG HDB/Classes/test
KAG-MAC:~ ken$ /Volumes/KAG HDB/Classes/test
-bash: /Volumes/KAG: No such file or directory
KAG-MAC:~ ken$

Notice that the path listed stops at the space after KAG.

If I move the program to a path without spaces everything runs properly.

Checking for existence: /Users/ken/Desktop/test
Executing: osascript -e 'tell app "Terminal"' -e 'activate' -e 'do script "/Users/ken/Desktop/test"' -e 'end tell'  (in /Users/ken/Desktop)
Process terminated with status 0 (-6266 minutes, -19 seconds)
 
Last login: Mon Sep  6 19:27:21 on ttys000
/Users/ken/Desktop/test
KAG-MAC:~ ken$ /Users/ken/Desktop/test
               Hello
KAG-MAC:~ ken$

Any ideas are greatly appreciated.

gamradtk:
If I run the executable (outside of Code::Blocks) that was generated by the build process it works properly.

Last login: Mon Sep  6 19:59:43 on ttys001
KAG-MAC:~ ken$ /Volumes/KAG\ HDB/Classes/test ; exit;
               Hello
logout

[Process completed]

BCCISProf:
This is a well known issue on the Mac. I simply tell my students  not to use blanks anywhere in the path.

Other Mac problems that seem not to have been fixed:
a. Printing from CodeBlocks hangs CodeBlocks.
b. Inability to change many settings within the editor settings window.

If anyone has a solution to the above, please let me know.

Workaround for a: Instead of printing, export to pdf and print the pdf.

gamradtk:
I am setting up 3 new iMacs in a computer lab for student use so this information is greatly appreciated.

Any additional words of wisdom for a newbie (both Mac and Code::Blocks) is also greatly appreciated.

afb:
Patches are of course greatly appreciated too...

The keybindings and debugger should have been fixed now (p1), but some of the other issues remain (e.g. batch building from command-line can also crash the program)

Navigation

[0] Message Index

[#] Next page

Go to full version