DEBUGGER EXE [message #1838696] |
Wed, 03 March 2021 19:28 |
sydney faria Messages: 54 Registered: March 2013 |
Member |
|
|
I made a C++ project with a makefile. Then I imported 5 files into the new project. Among the imported files was bistree_main.c, where the main() is, and removed the default file with a main() and then compiled the project in debug mode with no problems or errors. But then going into the debug mode by selecting run. I get the following fault.
"The program file specified in the launch configuration does not exist bistree.exe not found".
In the project manager files, I can see the files that I imported into the project, and in the projects debug folder I can see .o, .d, .mak, and two .exe files. The main thing that I see in this directory is I can see 2 .exe files: bistree.exe, the one the configuration can't find, and libbistree.exe! I have no idea why there is a libbistree.exe file! That's question 1.
The main thing that is befuddling me is that the file, bistree.exe, is in this debug project folder, and yet that is what the configuration manager is complaining about not being able to find! It looks like all the .exe files are there to run in debug mode, cannot find the bistree.exe file even though I can see the file in the debug folder. I have no idea how to solve this fault. That's questio
|
|
|
|
Re: DEBUGGER EXE [message #1838760 is a reply to message #1838720] |
Thu, 04 March 2021 16:47 |
sydney faria Messages: 54 Registered: March 2013 |
Member |
|
|
I made a simple C/C++ project that automatically included a makefile, to keep things as simple as possible. Then I added into the default project some .c and .h files (from my algorithms book), and then, because the default file in this project contained a main(), and what I added to the project, already had a main(), I removed the default file so there would be no conflicts. For the target of this project I selected to run in the debug mode. Everything else was done using default parameters. There were no warnings or errors during the compile. Only when I go to run the debugger do I get the message about not being able to find bistree.exe! But, if I look in the project folder, I see includes and debug folders, which seem OK since I did not choose anything but the debug mode to compile as a target. If I look into the debug folder I can see the bistree.exe file that the run time environment is complaining that it cannot find! So I am thinking there must be some sort of environment path variable that must be set up to fix this problem. But why do I have to fix this since the default setup should have done this already?
|
|
|
|
Re: DEBUGGER EXE [message #1838778 is a reply to message #1838765] |
Thu, 04 March 2021 21:38 |
sydney faria Messages: 54 Registered: March 2013 |
Member |
|
|
I've done some more searching around and found something very curious! In the project folder containing my project and looking at the properties of this folder I see a path to the debug folder as "C:\Users\Sydney\workspace\bistree\Debug" which, to me, is saying that the runtime environment has to look here for the missing bistree.exe file that Eclipse "can't find" fault when I try to run this thing in the debug mode. When I go into the run configuration menu for this project, I immediately see a strange problem. The path to the runtime project that I installed in Eclipse is the following: "C:\Users\Sydney\Desktop\C_algorithms_with_C\examples\bistree\Debug\bistree.exe". This, to say the least, is not what I expected!!!! This path is pointing to the folder where I got the files and imported them into this project!!!! There is obviously no .exe file here, and that is why,I hope, I am having problems. Eclipse is looking for the bistree.exe file in this folder: "C:\Users\Sydney\workspace\bistree\Debug" but the environment is set up to look here: "C:\Users\Sydney\Desktop\C_algorithms_with_C\examples\bistree\Debug" and that sure doesn't contain any .exe files!!!! Also, in this config manager is a tab to add in environment variables. Should I monkey around with this to make a path to where the debug folder is? If that is the case, then what should I name the environment variable so Eclipse will know where to go when running the debugger? If I set up a non debug project will I have to go through this all over again? This should have been done when I made the project to begin with.
|
|
|
Re: DEBUGGER EXE [message #1838789 is a reply to message #1838778] |
Fri, 05 March 2021 04:28 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
You can find the full path for files shown in the Project Explorer by
right clicking the file --> Properties --> Resource
There will be an entry called Location with the complete path.
If you do this on a project in Project Explorer
you get the project location.
You can get the path to the workspace with
Window --> Preferences --> General --> Workspace
In the dialog there is a section labelled Window Title and
contains a checkbox to show the full path with the path beside it.
The Environment tab in the Run/Debug configurations is for setting the environment used by your app.
The Run/Debug configurations are independent of any project.
They are in fact general launchers.
The Main tab C/C++ Application expects the path to an executable.
Eclipse allows that path to be relative to a selected project within the workspace.
In the Run/Debug configuration Main tab below C/C++ Application
there are buttons Search Project ... to search the selected project for the executable
and Browse ... to search the file system.
These are shown in the image I posted.
Use them to select your executable.
[Updated on: Fri, 05 March 2021 05:25] Report message to a moderator
|
|
|
|
Re: DEBUGGER EXE [message #1838838 is a reply to message #1838826] |
Sat, 06 March 2021 02:36 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
As I said before: what goes into the C/C+ Application edit box is the path to the executable.
It can be an absolute path or one that is relative to a project within the workspace.
I've been assuming you know the difference between the two but I'm beginning to suspect the assumption is wrong.
What both of your images are showing is an absolute path and apparently one that doesn't exist.
It's far from clear where it came from.
CDT normally would not insert an absolute path.
Try doing a "dir <that long path>" and I'm sure the OS will agree that it doesn't exist.
If you don't know where the executable is no one here would either.
If your project within the workspace really is bistree then try hitting the Search Project ... button.
[Updated on: Sat, 06 March 2021 02:42] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03534 seconds