NetBeans - C++ build current project - c++

When you work on NetBeans there is a defined main project.
And when ever you press the build or run button that project is being executed.
I was wondering if there is a way to build the current project I'm viewing.
So say I jump between projects and hit the run button, the project it will run will be the one in my current edit view.

In the newest version of Netbeans, currently 7.2, there's no such things as main project. Hitting F11 or the icon will automatically build the project which file you're viewing.

Related

Eclipse CDT, CMAKE project: No C/C++ Build Menu Item

Thanks in advance for the help.
This is on Windows/MSYS2 (mingw64) Eclipse CDT Version: 2019-09 R (4.13.0) Build id: 20190917-1200.
I have figured out how to run cmake in order to create an Eclipse compatible project file. I then got the project into Eclipse via I got this File->Open Project from File System. I can then make/build that file and create my executables. I do get a couple warnings regarding improper project path but the code all compiles without error.
However, I need to "connect" the cmake build directory (i.e. the project in Kicad) to my source code in order to edit and/or debug the changes I wish to make. Based on my research I believe I have to do this via the Project Properties C/C++ Build menu, however, this menu is not present. I believe I access this menu by selecting the project on the left and right clicking or alt-enter or from the top menu Project->Properties.
For some reason I can't do a screen grab on Eclipse but I pulled the image attached from the online help file: (https://help.eclipse.org/2019-06/index.jsp)
.
My "Project->Properties" menu looks similar in that it shows Resource, Builders, plus more things but there is no C/C++ Build entry: it just goes from Builders to C/C++ General.
I found this "solution" https://bugs.eclipse.org/bugs/show_bug.cgi?id=508319 which seemed appropriate as I had installed the standalone debugger, however, uninstalling it had no effect.
Any suggestions?
Thanks

Eclipse C++ IDE, Issues setting up

I'm having issues with setting up Eclipse for C++ editing. I am using Cygwin and Eclipse (obviously), and I've gotten to the point of making the example project Hello World. However, when I try to create a new project I always get the message "Launch Failed. Binary Not Found". I know this is a common issue, but why would the default hello world project work and not mine?
Thanks for any help.
First Build the project ( project menu in navigation bar)
then, A new folder named Binaries will appear now in project explorer. (refresh if needed)
Now you can try running your project, and no errors will appear.
more info here

Eclipse runs old code even after building the new one

I started to study c++ and i choosen Eclipse IDE for it.
I need some basic instructions.
Even after i compile my code with ctrl+b Eclipse shows me the old "Hello World" program in console. If i look up the compiled .exe files in my projects "Release" folder i can ran my new program very well.
For some reason Eclipse does not refresh output console.
Any ideas?
Have you tried checking that there are not still multiple consoles open. On the console tab try clicking the Display Selected Console button, or pushing the red terminate button until it becomes greyed out and then running it again.
I saw at the output console's setting's that it is showing my project's Debug release.
So i searched for the compiled in my Debug folder and i saw it was the old .exe of my project.
After that i did the same thing within the Release folder that was the new code!
So all i did was changed the run configuration to Release, pic below.
And now it is working.
Just clean the project from menu...

How to compile and run correctly a windows forms application

I added the C++ Windows Forms Application project to Visual Studio 2012, but I can't compile programs made with it correctly. When I press the "Local Compiler Windows" button, it doesn't compile it as it is. All the buttons, text boxes and etc. are not seen, just a white window. How can I compile it correctly?
Follow the below steps
1.Build your program first
File Menu---Build---Build ProjectName
2. Run it(shortcut F5 or the triangle shaped icon).
File Menu ---Debug--Start Debugging
Single step for building and running it:
Running the project directly, will automatically prompt for a build(if it hasn't been built yet) and then run the program.

Eclipse Project Run problem

I tried to create a C++ project in Eclipse Helios, it works fine for some simple "Hello World" projects (a single file etc..). However, now I have a little bigger project with several files, the project can still be built without any problems. Actually, when I get into the release folder, the makefile, object files, the actual binary executable are all there. And I could run the binary through the termainl. If I click the "Run/Debug" in Eclipse for this project, it always says "Launch Failed. Binary not found".
How could run the program in Eclipse? I would like to explore its debug features. In addition, I'm running eclipse in CentOS linux and I believe the basic g++, gdb setting etc.. should be all right, otherwise the daemon hello world won't work.
Warning: I have a very old version of eclipse and the CDT so the current procedure could have changed considerably.
In the C/C++ Project view, expand your project then expand the Binaries node. In there you should have a list of the built executables. Right-click on it and select the item Run As.. > Local C/C++ Application. This should automatically create a new run configuration which you can access from the green arrow icon and the little bug icon in your tool bar. Click on these to run normally or to run in debug mode.
If you want to tweak how programs are launched, goto to the Run configuration menu item of the green arrow icon. Select the configuration that you previously created or make a new one. You can then tweak the various launch settings like the executable to run, the arguments you want to pass, the required environment variables, etc.
Note that there's also a separate Debug configuration that can be accessed from the little bug icon in your toolbar. Within that dialog there's a Debugger tab which contains all the controls necessary to set up your debugger. Just randomly screw around with the controls until you find something that works for you.
I just had the same error, and here is what I did - proper binary parser must be selected so Eclipse can recognize the executable:
Select the project, then right click.
Project->Properties->C/C++ Build->Settings->Binary Parsers, PE Windows Parser
(or you can select Cygwin parser if you use Cygwin compiler, on Linux I use Elf parser).
That worked for me at least for Cross compiler (both on Windows 7 and Ubuntu 12.04)