Eclipse debugger: ".settings does not exist" error - c++

I am developing a C++ application in Eclipse under Ubuntu Linux 10.10. When I launch the application that I develop in debug mode then Eclipse correctly switches to the debug perspective, but it tries to open a file (?) called ".settings", which does not exist in my project directory (but there is indeed a directory with that name there). I can see that Eclipse supends the running thread at the right source code location (based on the stack trace), but that source file is not opened, nor does the "debug step" move the current instruction pointer to the next statement.
It basically seems to be the same error as here: http://dev.eclipse.org/newslists/news.eclipse.tools.cdt/msg08774.html -- unfortunately the solution there is to update Eclipse to 3.1.5, but I am using version 3.5.2 already, so that does not do the trick for me.
Any suggestions?
Thanks in advance, Matthias

Try to open all projects that are on the source file's path. I've experienced something similar with Java and a hierarchical project and that did solve my problem.

Related

Debugging fails with QtCreator on OSX

I have OSX Yosemite 10.10.5, QtCreator 4.1.0, Qt 5.7.0 and Xcode 7.2.1.
If I write any native C++ program in QtCreator (console, gui - anything) I am unable to debug that program from QtCreator. Breakpoints get ignored, the program executes without pause and runs to completion no matter what I try.
I have tried the Xcode's LLDb, system GDB and Homebrew GDB as debuggers. the versions of GDB fail to start. Homebrew GDB has been codesigned.
This all used to (a few year back) just work beautifully and I am at a loss as to what might have changed.
Curiously, if I generate an exception inside the program - like accessing through a null pointer, the debugger shows me where this happens in just the way I would expect so, presumably, the debugger is running but simply treating me with complete disdain.
I know there are many versions of this question but none seem to address the problem adequately or offer workable solutions, or they apply to much older versions of the products.
Any suggestions?
This version of qtCreator (4.1.0) saw the return of the warning about having the build directory at the same level as the project directory. In Windows, this is done automatically. My mac installation does not get it right. (I may have messed a while back - cannot remember).
So - if the build directory is inside the project directory, debugging fails. Move the build directory up to the same level as the project directory and everything seems to work fine.
You can set the default build directory in the preferences/Build & Run dialogue. The path should start with ../
You will need to think about the folder structure before setting up the project unless you want build folders appearing in awkward places. So, a project folder structure like this is OK:
But one like this is not:
If this was already obvious to you, great. I have been messing with this for ages.
Many thanks to those who replied and anyone else who took the time to read the question. What helped e find it was the suggestion by #AlexanderVX that his setup was the same as mine but his worked. The only bit of my setup he could not see in the screenshots was the start of the build path. So that was the clue.

"Launch failed. Binary not found." error on CDT Kepler Eclipse

Running or debugging anything gives me an extremely frustrating "Launch failed. Binary not found" error. I'm using Eclipse with a CDT plugin installed (specifically, I have the MinGW package installed).
I already tried setting both the user and system PATH variables to include my (MinGW directory)/bin
I also tried building the program before running it.
I also made sure that PE Windows Parser under the project's settings was enabled.
I went to Project Properties > Run/Debug Settings > New > C/C++ Application > Environment > Select > and I selected the Path
I also tried setting the C/C++ Application in the Main tab to the executable file that is made from building the program, but no such file is made when I do build my program. I seriously doubt that this is what's causing the problem, though.
I'm running out of options, and the problem still persists. What else needs to be done? What am I doing wrong?
When I was looking through the install instructions for MinGW, the tutorial referenced the mingw base package as the package to install after installing MinGW. But mingw base was not available to me. Instead, I saw mingw32 base. Could it be that Eclipse, a 64 bit program, is trying to run 32 bit code? Is that what's going on? If that's the problem, how do I fix it?
Build
Refresh the project. A new folder named Binaries will appear now in project explorer.
Now Run :)
It took me 3 days to figure out my problem. My Hello World C program would compile in eclipse using the Windows PE Parser, but there was NO EXE FILE!!!! AVAST Antivirus was identifying the exe file as a false positive and removing it....grrrrr. The solution was to add the eclipse workspace folder to the exclusions list. Voila!! Eclipse generated my test.exe file.
save the file first before you build and run... it works with me
Check the compiler you set while you created the project . If that is MINGW or Visual Studio ; check whether they are downloaded or not . If not do so and start a new project by closing the old one . Build the new project by pressing Ctrl + B and a new file 'Binaries' is created in the package explorer . Now you can use the run option to run the project .
First the solution: install "make"
I had the same issue.
I also tried the steps you did with no luck.
After some time i found a the solution!
The problem was that i did not have the application "make".
Apparently its not installed by default on Cygwin and eclipse doesn't give any indication for that...

Juno CDT plugin failing to run a C++ application

I have a simple mixed C/C++ application (OpenGL example) which I have successfully built using Eclipse CDT in Juno (MinGW toolchain).
I can run this application fine by hand from a Win7 command console, but it seems to rarely work when running from Eclipse's "Run as" menu. Whether it works or not seems down to seemingly unrelated changes in the code, and I get nothing of interest on the Eclipse run console (just a <terminated> status) even when no code near the start of the application has changed.
I'd like to and it sometimes I can work around this for now, but would be good to get this working if anyone has any ideas - it seems an essential stepping stone to get the debug environment working in Eclipse.
EDIT Side thought - eclipse seems awfully thin on debug diagnostics when something like this fails. If there is any way to turn on more debug I'd welcome the knowledge =)
Resolved - the issue is down to the path being given to the application, or more specifically the OS launcher (so it can find the DLLs it needs).
Even through the default "run" config claims to inherit the parent environment, it doesn't seem to get the same environment as the Win7 command console. I had to manually edit the "Run as" config in Eclipse to have a custom PATH environment variable containing the directories I needed (MinGW/bin, and a directory containing some custom DLLs).
Cheers, Iso

Configuring Eclipse for MinGW

I am using Eclipse Juno with MinGW (latest version) on my Win7-Laptop.
My example code is successfully built within the IDE, but I can neither run nor debug it!
When I choose Run as=>Local C/C++-Application, I get
Launch failed. Binary not found.
However, there IS an exe-file as a result of the build process!
When I call cmd.exe, navigate to the source directory and call this built exe (a.out.exe), it works without problems!
I guess this is due to wrong/missing configuration of eclipse, but I couldn't find useful info on that so far.
This thread mentions environment variables. I added MinGW and Msys to my PATH variable (that's why I can compile) but I can't run my software in eclipse!
So, what can be done to enable debugging?
I have made a little tutorial.
how to set all for Eclipse have a look it's here https://stackoverflow.com/a/12169583/1322642
Hope it can help you a little bit.

Basic Qt app crashes upon launch

When I launch a basic Qt app within Eclipse, it crashes with a ".exe has stopped working" error.
The context :
its the basic app obtained when creating a Qt GUI project (with a MainWindow), nothing was changed in it, haven't even added a button
PATH has all the necessary stuff (mingw, msys, qt)
project properties and eclipse paths should be ok too (c++, qt, mingw)
the .pro file is ok, no file missing
clean & rebuild, as well as relaunching eclipse doesn't resolve the problem
upon compilation there is no error, just an ignored "cannot lstat `ui_.h': No such file or directory". No relevant result found when searching around that.
if launched, stops with the afforementionned error. Details show its the app that crashed, with error code c0000005, offset 00002cb20. Search results tells me c0000005 is access violation, but where would that come from ? It's the basic app...
tried to launch with eclipse being in admin mode to prevent accesss violation, didn't help
if launched in debug mode, stops with error "Can't find a source file at ../mingw/main.c". I thought I forgot something when I installed mingw, so I did its setup again, but that did not create that file. No relevant search results here either.
my setup: eclipse classic x32 with c++ & php stuff, qt 4.8, win7 x64
I'm getting lost here. I already worked with Qt under Eclipse before (on winXP and vista), got my bunch of installing problems but this one is a first. Anybody went through this already ? Any leads on how to find where the access violation is happening ? Reading this question makes me think it's a Qt Eclipse Integration problem, but how can I circumvent that ?
Thanks for any leads !
Your project doesn't have a TARGET = set in the .pro file. This was probably caused by an Eclipse/Qt plugin wizard screw up, so just typing a new target may not work, other files may have to be renamed manually.
FWIW development on the Qt plugin for Eclipse was halted some time ago, building outside of Qt Creator is definitely one way of making life more difficult for yourself.