Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » DEBUGGER EXE(won't exe file)
DEBUGGER EXE [message #1838696] Wed, 03 March 2021 19:28 Go to next message
sydney faria is currently offline sydney fariaFriend
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 #1838720 is a reply to message #1838696] Thu, 04 March 2021 07:06 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Quote:
I made a C++ project with a makefile


This is a makefile built outside of Eclipse?
If so, answering your question about what is being built is not possible without further info.
Questions involving debugging makefiles and code are generally off-topic.

Quote:
The program file specified in the launch configuration does not exist bistree.exe not found".

The debug/run configuration application files are often relative to the project so
the location of an executable in the Debug folder would be Debug/<whatever>.exe

For example,
index.php/fa/40076/0/
Re: DEBUGGER EXE [message #1838760 is a reply to message #1838720] Thu, 04 March 2021 16:47 Go to previous messageGo to next message
sydney faria is currently offline sydney fariaFriend
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 #1838765 is a reply to message #1838760] Thu, 04 March 2021 17:45 Go to previous messageGo to next message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 742
Registered: August 2014
Senior Member
From the menu, open Eclipse help -> C/C++ Development User Guide.

Read the parts:
- Before you begin,
- Getting Started
- Tasks -> Running and debugging projects


--

Tauno Voipio
Re: DEBUGGER EXE [message #1838778 is a reply to message #1838765] Thu, 04 March 2021 21:38 Go to previous messageGo to next message
sydney faria is currently offline sydney fariaFriend
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 Go to previous messageGo to next message
David VavraFriend
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 #1838826 is a reply to message #1838789] Fri, 05 March 2021 19:07 Go to previous messageGo to next message
sydney faria is currently offline sydney fariaFriend
Messages: 54
Registered: March 2013
Member
Attached is the launch config for my project. The workspace path goes to the project as expected, but in the launch config, run/debug environment properties the path is pointing to the folder from where I imported the source code files into the project and not the debug folder in the project where the exe files and the imported code files are actually located. No wonder why the run time cannot find the bistree.exe file! So, from what you are saying, I have to browse for the path to the folder where the exe file is so I can run it.

The main difference between this project and the hello example project is my project has some files imported into this project from some other folder that I wanted to test and fool around in my c algorithm book. So it seems that all my problems are a result of making a c make file project and importing files into the project!

I sure hope there is a way to fix this problem with the project manager, so it will know where the exe files are located and not assuming they are in the folder where I imported them from. It could be a little tedious to have to do this for every new project that I make and import code into. Maybe some guru knows how to fix this?
wt1v
Re: DEBUGGER EXE [message #1838838 is a reply to message #1838826] Sat, 06 March 2021 02:36 Go to previous message
David VavraFriend
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

Previous Topic:make file with existing code
Next Topic:No Console Output (MinGW, CDT)
Goto Forum:
  


Current Time: Thu Apr 25 22:45:47 GMT 2024

Powered by FUDForum. Page generated in 0.03534 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top