Have installed “Command line” but whenever i try to build and run the program terminal says “No such file or directory”

command lineterminalxcode

enter image description here

I have tried to build and run my project through CodeLite.

I have installed Command Line but somehow it doesn't work.

It says "no such file or directory"

but whenever I ask it to look for gcc, it tells me that i have it in my Mac.

What should I do? Please help!

Best Answer

You are using the terminal incorrectly. Put double quotes around the path:

cd "/Users/Kathieen Ashley/Documents/mytest/testproject2/Debug"
## new line!
./testproject2

Don't use &&, they do not do what you think they do.

If you want to know more, have a look at Bash Guide for Beginners.

To elaborate a bit more on your questions:

I have installed Command Line but somehow it doesn't work.

It seems to work just as intended, but maybe not as you intended.

It says "no such file or directory"

cd, a command called ‘change directory’, says that there is no such directory or file as /Users/Kathieen, which is correct since your user folder seems to be
/Users/Kathieen Ashley (note the space followed by an additional word)

but whenever I ask it to look for gcc, it tells me that I have it in my Mac.

That is correct, gcc is installed correctly.