When trying to debug this Eclipse CDT Project compiled with Mingw-w64 (build-info.txt) and clicked Debug as Local C/C++ Application, the following error is shown:
Reinstalling Mingw-w64 didn't fix the problem. A sample Hello World C++ Project compiles and debugs as expected but for any reason this Project doesn't. Maybe it has to do with the fact that it utilizes the libxl-3.6.2.0 dll from bin64 folder to read an excel file.
Eclipse configuration:
Eclipse Mars.1 (4.5.1)
C/C++ Development Tools 8.8.0.201509131935
C/C++ GDB Hardware Debugging 8.8.0.201509131935
C/C++ Library API Documentation Hover Help 4.1.0.201509161915
Debugging became possible just adding the 64 bits dll inside LibXl folder bin64 to the Debug folder (where the generated executable was created). This solution insight came from #smurff1975's comment in the following thread.
Related
I have installed Visual Studio Community 2013, QuantLib and Boost and have gone through the steps of building the complete quantlib project as per http://quantlib.org/install/vc10.shtml guidelines.
I created a new project under QuantLib_vc11.
I both built Quantlib and the project in Debug Mode. No errors.
Then when I try to debug, I have the following error:
unable to start program QuantLib-vc120-mt-gd.lib_
Do you know where it comes from?
And another question, can we use QuantLib with CodeBlocks?
Thanks.
You're debugging with the QuantLib project as the startup project. Since
QuantLib-vc120-mt-gd.lib is a library, and not an executable file, the debugger rightly complains that it can't start it.
Before launching the debugger, select your new project as the start-up project instead. (I'm assuming that your new project defines a main function and creates an executable, right?) This will cause the debugger to start your program with QuantLib linked.
As for CodeBlocks: there's no included project for it, but QuantLib works with most (if not all) compilers it supports. Creating a new project in CodeBlocks and adding all the sources in the ql folder should enable you to create QuantLib. Note that you'll have to tell CodeBlocks to create a library; I'm not familiar with the IDE, so I'm not able to advise on how to do that.
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...
I am on Windows 7 32 bit using Eclipse Juno. I have installed the CDT plugin. I have also installed Cygwin and the necessary files from packages like gdb, gcc, gawk, make etc.
I still get a Binary Not Found error. I had a look at this question
Launch Failed Binary not found Eclipse for C in Windows tried everything but there seems to be no solution for it.
What is going wrong ?
There can be multiple reasons for this :
First : Select Preference (click on Eclipse in MAC machine left top OR Windows from menu in Windows OS to find preferences) --> C/C++ --> New c/c++project wizard--> change to MACOS GCC (for mac) or Cygwin GCC (for windows)
Second : I had the similar issue but code was different. In File.h file make sure
virtual ~Destructor () {}; //Don't forget Curly braces {}
Above statement shows destructor initialized () and defined with curly braces { } . In my code I forgot to define Destructor.
Hope this helps
Go to Window -> Preferences -> C/C++ -> New C/C++ Project Wizard -> Makefile Project.
Choose one the following parsers and try with a new project.
PE Windows parser
Cygwin PE parser
I was also receiving "Launch failed. Binary not found." My problem was AVAST Anti-virus. My Hello World C program would compile in eclipse CDT using the Windows PE Parser and mingw gcc compiler, 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.
Run eclipse from a cygwin shell :
pathToEclipse/eclipse.exe
Choose compilator cygwin Gcc when you build a new project.
Build and Run work now.
Simply go to the project(main manu)-> Build all
This will solve your problem.
On Linux, I have some C++ programs built with my own makefiles, and I'm looking for some GUI debuggers to debug them at source level.
Previously I use KDbg(2.5.2) on openSUSE(12.3). It works but with some very annoying limitation, e.g., I cannot set a breakpoint when the debugged program is not trapped by Kdbg -- I mean, in order to set a new breakpoint, I have to set it before the program is launched or the program pauses on hitting an already set breakpoint.
Now I try to use Eclipse CDT. I got eclipse-cpp-juno-SR2-linux-gtk.tar.gz but find that I don't know how to load my executable so to start debugging.
I googled with words like 『eclipse debug pre-built C binary』, but few seems to care about this feature.
Can Eclipse CDT really do that? If Eclipse CDT can't, is there any better alternatives to KDbg? Please help.
According to hint from this answer, https://stackoverflow.com/a/248119/151453 , I finally figure out how to do it.
The key point is: In the Eclipse CDT project, create/edit a Launch Configuration so to tell the debugger what executable to load.
Now I have to admit, Eclipse CDT does quite well in C++ code debugging far better than KDbg.
Some screen shot below, on openSUSE 12.3 .
Now we can Run -> Debug (F11)
Debugger automatically pauses the program at main()'s first statement.
The Stand-alone Debugger is an Eclipse application which packages the Eclipse plug-ins from the CDT (C/C++ Development Tools) project into an application that can be started from a command-line script:
bash /path/scripts/cdtdebug.sh -e executable [args]
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.