What is eclipse doing after it builds my c++ code? - c++

I am using Juno (downloaded today). I setup a new project with perhaps 10,000 c++ files. I also setup a custom build command that does an ssh out to a remote machine to build the code. (The code is on a drive shared by both machines.) When I build, the console output shows the build command, and it runs and completes pretty quickly. However, after the ssh command is done, it takes perhaps 2-5 minutes before the "Build Project" dialog goes away. In the details section it just says "Building Project...", and the progress bar does not move beyond 25%. The back and forth animation in the lower right of eclipse is moving back and forth.
Does anyone know what Eclipse is actually doing during this time?
Does anyone know how to make it stop whatever it is doing?

Related

Update server with unsynched file from VS

I code in C++ with VS19. I debug on a remote machine (specifically a docker container), which means that my IDE copies the changed files whenever I hit the debug button and build the program in the target.
My remote machine isn't stable and sometimes it restarts and reverts to the initial state of my image.
When it does, I usually have files on the IDE that have been already copied to the remote machine before. When I start debugging, my IDE thinks there is nothing to update the server, and executes the program remotely. The thing is that the files on the remote are outdated and then my debug is showing wrong lines and an outdated version is executed.
The only solution I have found so far it to do a minor change in all the files that I remember that I have changed, which in turn tells the IDE to update those files on the remote.
This is really hard and sometimes files are missed.
I have found nothing about it online, will be glad to hear if someone tackled this problem.

Qt Application not running

I am trying to run a simple "Hello, world" console application but I am experiencing some errors when compiling that I am not familiar with. I have done a bit of research into similar problems with Qt but I haven't been able to find a solution. The closest solution I have come across was to change my Patch Command setting under:
Preferences -> Environment -> System -> Patch Command
to
usr/bin/xterm -e
However, when I try to do this it goes red indicating that I do not have this file.
Environment Preferences Window
The following image is a screenshot of what is displayed in the terminal window when attempting to compile my project.
Console Application Output
Any help on this problem would be much apprectiated! It is very frustrating having something like this hold me back!
Don't run your project in a terminal unless you actually select a working terminal, and that's all. The patch command is irrelevant in this anyway - it's not the terminal, but the patch command -- used to patch source code. You don't need it unless you explicitly use code patching. Go to Projects (Ctrl-5), click on the active Run configuration for your project, uncheck "Run in terminal", done.

Why do I have to "Build-All" in Eclipse for my C++ program to run?

As the title states I have used Eclipse regularly in the past for making Java programs, it's been a simple process and when I click on the green run arrow the program compiles and then executes.
I've only ever written c++ in Netbeans and I've been asked to move over to Eclipse, I have everything set up but when I start a new program (c++ executable program) and it's never been run the first time I try to execute it with the green button I get the error Launch Failed. Binary not found.. If however I then go to project -> build all (or press Ctrl + B) it then allows me to run the program. Is there a reason for this? Can this behaviour be changed so that it acts like Java and just runs, or is this not possible?
Thankyou
Oh also if this matters I am on Windows 7 64bit running Eclipse Kepler 64bit with Cygwin 64bit.
You can go to Preferences->Launcing and enable the "Build (if required) before launching". And you probably want the "Save required dirty editors before launching" to "Always" as well.

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

Why does Eclipse default to debug mode whenever I make a new C++ project?

I am about to break something... or pull my hair out...
I just installed:
Eclipse SDK Ver 3.7.2 (Indigo)
CDT
MinGW
I have those two so that I can start to develop C++ on my machine, which is using Windows-XP 32-bit.
Anyway, I got a simple hello-world up and running, and all is peachy... BUT, the problem I have noticed is that everytime I make a new C++ project, it starts it off under Debug mode. I do not know how or why this is, I have gone through just about every option I can see on the menus.
I also do not know how to quickly switch between the modes, and maybe this is hurting me as well, since I am new to Eclipse.
What I want is simple:
Start Eclipse.
Make a new C++ project.
Hit build.
Hit run. (The play button)
Have it run as a release.
"Do something(?)" to switch to debug mode.
Put a breakpoint somewhere.
Hit build.
Hit debug button (the cockroach)
Have me stop over lines of code.
This will cause my hair to remain on my head.
Just for context, my end goal here is Eclipse-As-IDE -> MinGW-as-Cplusplus_compliler -> OpenCV
Thanks in advance!
I'd say the reason for starting in debug mode is that every bigger project will take time, testing and "debugging" to get to a stage where it is ready to be "released". Therefore it defaults to debug.
You can however quickly change to release mode by right-clicking on the project:
Build Configurations->Set Active->Release
For most small projects it doesn't matter what you set. When you get to bigger projects, linking to different libraries depending on whether you are debugging or building for a release, you'll be taking the time to set different parameters in eclipse for different configurations.