User forums > Help

No such file or directory error when running a simple program

(1/1)

katee:
Hi,

I'm new to C++ and Codeblocks. I creating my first C++ program on a Mac with Mountain Lion. When I run it, I get this on terminal.

Last login: Mon Jan 21 17:31:08 on ttys000
Kate:~ kate$ /Users/kate/Documents/Hello World/main
-bash: /Users/kate/Documents/Hello: No such file or directory
Kate:~ kate$

I have installed  Command line tools (for ML) for Xcode and XCode 4.5.2(not sure if this is necessary).
Please help me!

Thanks,
Kate

Jenna:
Please do not start two threads with the same question.
I removed the other topic.
Which version of C::B do you use ?

You can try it in a foldcer without spaces, even if it should work with a recent version of C::B (or it is a bug).
And use file-endings for your sourcefiles (they are not added automatically), it looks your file has no ending.
C::B will not be able to determine which compiler to use.

katee:
Thanks! it worked after I delete the space on the folder name.

Navigation

[0] Message Index

Go to full version