Eclipse and CDT, sometimes build does not generate a new binary - eclipse

The system is Linux. I have a C++ prjoject opened with eclipse. In another window I have a terminal in the folder where the binary is created. Normally I edit the project, I build it and i execute the binary from the terminal and it works. However sometimes it seems that the build doesn't update the binary. Anyone knows how to fix this behavior?
Note: I don't want to do a Clean manually all the times because isn't comfortable, expecially because I my touchpad's right click that doesn't work very well under Linux. However it would be ok if the clean was done automatically.
Thanks

Do you have the save automatically before build setting set?
If you do not save your project before the build eclipse will not create a new binary.

Related

Recovery of Qt4 Designer Integration with PyDev for Eclipse neon.2

My Eclipse Neon.2 crashed recently and now the integration of PyQt, in particular the integration with Qt4 Designer seems to have become corrupted. It was the case that I could open a *.ui file from Neon.2 to Qt Designer, make some changes & then run (from Neon.2) a *.py file which accesses the variables created in Qt4D. Now python fails on any new variables I add in Qt4D, but is ok with those created before the crash. I suspect the PyDev integration in my Neon.2 has been corrupted such that the auto pyuic4 does not get run. Question. How do I get out of this mess, eg re-install PyDev in Eclipse (or some other way perhaps)?
Well, PyDev didn't actually do anything automatic in this regard (i.e.: by default it doesn't translate .ui files to .py files with pyiuc4).
The way to do that automatically would be creating a custom builder (right click a project > properties > builders > new > program) and then configure it to run some program which would check if it was a .ui file changed and call pyuic4 on it.
Eclipse external tool for Qt .ui to .py with pyuic has something you could probably use.
Not sure how it worked before for you though... maybe some co-worker had it configured for you or your project already had those settings saved?
Well this does what I wanted:
qtcreator_file = "test1.ui" # Enter file here.
Ui_Dialog, QtBaseClass = uic.loadUiType(qtcreator_file)
My guess is it basically runs something like pyuic4 this avoiding running ones self after having made changes is QtDesigner.

Eclipse trouble when building project with GCC

I'm using Eclipse + gcc compiler for ARM Cortex-M3 processors.
After a successfull project build, if I modify a source file and I start build again, it builds the whole project again instead of the only modified file.
I noted the following:
- I go to another build configuration and I successfull build it;
- then I go back to previous configuration and it builds the modifiede file only;
But the problem persists: if I restart build it will recompile all even though nothing changed.
I hope I was clear.
Any suggestions?
Best regards,
Valter
Sorry, I didn't understand your question: what do you mean? I click on "build" hammer button. It seems that it started to happen when I simply changed build configuration name because, before this, it has been working properly for months. It seems that make procedure inside Eclipse doesn't recognize that file was already successfully compiled.
Thanks a lot.
Valter

Compiling in Eclipse/STS produces no output

I'm a Visual Studio .NET developer who's trying to switch to Eclipse/SpringSource Tool Suite, so I get stuck on probably simple problems. Please bear with me.
I'm working on a Spring MVC project associated with an Apache Tomcat server. If I right-click the server and choose Start (alternatively Package Explorer->right-click project->Run As->Run on Server), my project is compiled and started. Compiler output is shown in Console window. Fine.
But if I simply want to compile the project without running it, I try selecting Project->Build All, Project->Build Project, or Project->Build Working Set. Nothing happens, no screen output, nothing -- despite having non-compiling code.
I expected to see the compiler errors on screen, preferably with the errors highlighted in the code. For what it's worth, I have deselected Project->Build Automatically. Anybody knows what I should do?
Eclipse and STS use incremental compilation. So, every time a file is saved, it is automatically compiled (as well as all files dependent on it). When you deselect Build Automatically, then yes, you will need to explicitly build, but this will still be an incremental build (ie- only the changed files and dependencies).
See here for a bit of a discussion on how incremental building works in Eclipse: http://www.eclipse.org/articles/Article-Builders/builders.html

Gnatbench runs Ada program before compile

I have GNATbench installed in my Eclipse (Indigo) for coding in Ada; and for some odd reason, the program is first run and then compiled, which doesn't quite work when I update the code. I know the compiler works, because if I run the program manually it works fine; and if I hit run again, it runs with the proper changes made. A side note: I prefer using eclipse, and I'd rather not just compile from the command line. I am running Indigo on Ubuntu 11.4.
You should disable "Build Automatically" in the Project menu and then build manually before running. This can be done using the Ctrl+B shortcut.
odd. is it actually running? Gnatbench does a syntax/file check everytime it saves. I'd make sure your gpr file is correct and that your project isn't nested within another eclipse project or else eclipse can act kinda weird.

Completely lost with Blackberry JDE for Eclipse

I'm serious. I installed the Blackberry web developer thing for eclipse (being stupid, and not seeing the 'web' part). Then, when I realized my mistake, I went and got the JDE for Eclipse. I went through the install process....open up Eclipse...and I'm lost. I don't know how to run code...or the simulator, or anything.
All the tutorials I'm finding are referencing an older "beta" version of the Eclipse plugin, which apparently had a "Blackberry" menu option. I'm not seeing that.
I found some sample code, which gives the helpful instructions:
"1. Extract HelloWorld_incomplete.zip
2. In the IDE, open the helloworld.jdw workspace
3. Open the helloworld.java source file.
"
...I've never seen a .jdw file before. If I try opening it in Eclipse, I get a not-very-useful text file. Since they say it's a workspace, I try the "Switch Workspace" option in Eclipse, which lets me pick a folder, rather than a file.
I'm pretty sure "Import Project" isn't right, either.
So, I figure I'll deal with that later, so I open up the source code (a standard .java file, with a main, etc). I try running it, but it asks for an Ant build file.
I can run standard Java files just fine (that is, I know Java is in my path).
I don't know if maybe I don't have the Blackberry part right...or if it's on the eclipse side where I'm failing.
Does anyone have any ideas?
-Jenny
Edit: Just to be sure, I tried downloading the plugin through eclipse with their provided link (http://www.blackberry.com/go/eclipseUpdate), but eclipse says that it got a .jar file when it was expecting a .zip file, and so it errored. Can you even unzip a jar file (like Eclipse is trying to do?)
It sounds like you have the wrong package.
I installed it yesterday from the "Download Now" button at http://na.blackberry.com/eng/developers/javaappdev/javaeclipseplug.jsp
and it had both the menu option and the Blackberry project type.
It should have an installer if you get the correct one. I would post a direct link, but RIM likes to ask for your info before allowing the download.
Try installing it to a different directory and using a new workspace. It could be that the old install is interfering somehow.
-Hope that helps
if you want to know step by step to install the jde plugin in eclipse you can visit http://learn.virtue-software.com/2011/05/quick-start-creating-blackberry-application-with-eclipse/