Newbie help: No such file or directory found

CodeLite installation/troubleshooting forum
sweetac01
CodeLite Curious
Posts: 2
Joined: Tue Jun 13, 2023 1:14 am
Genuine User: Yes
IDE Question: SQL
Contact:

Newbie help: No such file or directory found

Post by sweetac01 »

Hello! I am currently teaching myself C++ from one of the courses on Udemy. The code I made is:

Code: Select all

#include <iostream>

int main()
{
    int favorite_number;
    std::cout << "Enter your favorite number between 1 and 100: ";
    std::cin >> favorite_number;
    std::cout << "Amazing! That's my favorite number too!" << std::endl;
    return 0;
}

Super basic because I just started. When I build it, there are no errors. Then when I run it, I get this message in my terminal:

Last login: Mon Jun 12 14:18:44 on ttys004
/tmp/codelite-exec.sh ; exit;
alexissweet@Alexiss-MacBook-Air ~ % /tmp/codelite-exec.sh ; exit;
/tmp/codelite-exec.sh: line 3: cd: /Users/alexissweet/Workspaces/Workspaces1/build-Debug/lib: No such file or directory
Hit any key to continue...

When I look at the pathway in my Explorer tab, there are two FirstProgram folders. The first FirstProgram folder is in the build-Debug folder, but that one doesn't have the code. The second one is its own equivalent folder to build-Debug under Workspaces and that is where the code is. How do I change the pathway so I can run my build?

Thank you in advance!

DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Newbie help: No such file or directory found

Post by DavidGH »

Hi,

Have a look at your Project Settings (the spanner/wrench icon in the Workspace View). You'll see something like this:

IntDir.png

You probably need to add something sensible to the 'Intermediate Directory' field; most likely /Users/alexissweet/Workspaces/Workspaces1/build-Debug

Regards,

David

You do not have the required permissions to view the files attached to this post.
sweetac01
CodeLite Curious
Posts: 2
Joined: Tue Jun 13, 2023 1:14 am
Genuine User: Yes
IDE Question: SQL
Contact:

Re: Newbie help: No such file or directory found

Post by sweetac01 »

David,

Thanks for your response. I added that, but am still getting the same error. What should I try next?

DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Newbie help: No such file or directory found

Post by DavidGH »

What should I try next?

That's hard to say.
I suggest you paste here the relevant bits of your Project Settings General, Compiler and Linker tabs.

You could also try adding, to your Environment > Additional environment variables field
LD_LIBRARY_PATH=/Users/alexissweet/Workspaces/Workspaces1/build-Debug/lib

Alternatively you could create a new Project, but this time putting everything in /Users/alexissweet/Workspaces/Workspaces1 (or wherever the new project actually is). Make sure when you create that project, the you set the top field, PATH:, correctly.

Post Reply