Author Topic: No such file or directory error when running a simple program  (Read 4851 times)

Offline katee

  • Single posting newcomer
  • *
  • Posts: 2
No such file or directory error when running a simple program
« on: January 21, 2013, 10:44:53 am »
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

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: No such file or directory error when running a simple program
« Reply #1 on: January 21, 2013, 10:59:24 am »
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.

Offline katee

  • Single posting newcomer
  • *
  • Posts: 2
Re: No such file or directory error when running a simple program
« Reply #2 on: January 24, 2013, 04:09:13 am »
Thanks! it worked after I delete the space on the folder name.