How to use the "Resource Files" logical folder in Netbeans IDe for C/C++? - netbeans

As can be seen in the below screenshot, a Netbeans C/C++ project allows the addition of resource files. When I Google things along the lines of "Netbeans C/C++ 'Resource Files," nothing useful comes up. As such, I ask here: what are they and how can I use them? Is it just a logical folder that the application can use at runtime with regular fstreams, or does it allow the embedding of files in the final executable similar to Java's getClass().getResourceAsStream() mechanism?
NOTE: I am using g++ 5.4.0 on Ubuntu 16.04 LTS x64 if these are platform independent in any way (in which case I would like to know how to use them on Windows and other versions of Linux as well).

Related

Which IDE is used by DPDK developers, and how do they debug their code?

I want to know if there is an IDE that is used by DPDK developers to develop a DPDK. I use the 'make' tool to build DPDK and DPDK example applications. I want to debug the code and want to know if there's any IDE that I can use. DPDK is developed in C language.
update: Intel system studio is now supported with free license model. On linux this is supported with eclipse with all tools. Have a try.
I prefer to use GDB with TUI enabled with DPDK library and example build with '-g'. You can achieve this by passing EXTRA_CFLAGS=" -g " make. I have also seen people using eclipse with remote gdb too.
based on the follow-up comment, please find the answer to using eclipse IDE on Linux for DPDK setup shared below
Note: I do not use Eclipse IDE but once tried it out C projects with Makefile.
as far as I can recollect one needs to install Eclipse with
Eclipse-CDT plugin.
Then create the new project with the option Makefile exists.
Add the project with files.
Here we have 2 options:
add the Makefile of the target build. or
add the Makefile of the test application (example l3fwd).
It will be really helpful if either Makefile is edited with -g or EXTRACFLAGS=-g is passed.
You can check how to import cmake to eclipse project.

Building OPCUA for vxworks using cmake

I am building OPCUA for vxworks 6.6. I got a information in
http://forum.unified-automation.com/post2724.html#p2724
It is mentioned as below "create a new CMake project for "Eclipse CDT4 - Unix Makefiles" with the vxWorks CMake toolchainfile."
Here what does author mean by "vxWorks CMake toolchainfile."?
I am also looking for steps in building in generate project for vxworks workbench from CMake, like what are prequestie software to be avialable (I have CMake 3.2.2 installed on windows 7 machine). It would be good if steps are explained with simple Helloworld application how do we generate vxworks workbench project from windows CMake3.2.2.
thanks
Here what does author mean by "vxWorks CMake toolchainfile."?
A toolchain file is a file with informations about the toolchain used for a target platform. It contains compiler to use, include paths, libraries etc.
The problem: CMake doesn't support VxWorks.
What you can do:
Does OPCUA already contain one (or other kind of cmake support)?
If so, you are on the lucky side ...
Write your own toolchain file
It's not that difficult
Recommendation: Write a toolchain file and platformfiles describing your target platform (Some info: here (useful!), here and here)
Search if you can find one in the internet
Use the basic Cross-compile features of CMake
(in the CMake GUI: Use "Specify options for cross-compiling")
In some cases this is enough; set compilers and include paths
This is more or less what the toolchain file does
I am also looking for steps in building in generate project for vxworks workbench from CMake
As VxWorks, the Workbench is not an official supported IDE. Therefore you can't generate Workbench project directly. But since the WB is Eclipse based, you may use the usual Eclipse project files. Disadvantage: Not all WB features are available (but you can achieve most of these with CMake).
like what are prequestie software to be avialable
Just CMake, the Workbench and the usual VxWorks platform (Compiler, libraries, BSP, ...).
It would be good if steps are explained with simple Helloworld application how do we generate vxworks workbench project from windows CMake3.2.2.
As you have seen: this is not that easy. But the basic steps:
Write a toolchain file (if you don't have one) and maybe platform files (depending on how many platforms / compiler you want to support). You get some help from the link above
Check if your toolchain file leads to successful compilation
Generate Eclipse project files (infos: CMake:Eclipse UNIX Tutorial and Eclipse CDT4 Generator)

Are Eclipse Plugins Platform-Independent?

I want to distribute an eclipse platform with pre-installed plugins to different users with different operation systems.
On the side http://www.eclipse.org/downloads/ I have to choose the target platform for eclipse, so I downloaded it for Linux 32 and 64 bit and for windows 32 and 64 bit.
I want to distribute an eclipse with some pre-installed and also self written plugins to other people. Can I simply install the plugins in one eclipse installation and then copy the files from the /plugins folder to every /plugins folder of the other eclipse versions for linux and windows or are the plugins (also the pre-existing default plugins) in the /plugin folder also platform dependend and must be installed seperatly on the target platform?
Some are, some aren't. Eclipse supports the inclusion of native code in OSGi bundles, and then unpacks it and accesses it via JNI. The native code can be in separate 'fragments', and Eclipse won't necessarily download all the fragments for other architectures.
Well, here's the way I see it: Eclipse is written in Java, which is platform-independent. Eclipse's plugins are, therefor, written in Java, and must be platform-independent. Also, I've yet to encounter a plugin that wasn't platform-independent. So yes, to the best of my knowledge.

Setting up Eclipse for other programming languages

I have installed Eclipse (Helios) for the Java programming language, but I also want to use it for programming in C/C++, Python and Ruby. I've installed CDT and DLTK (for Python and Ruby).
I already had mingw-w64 (Windows platform) installed. How do I set up Eclipse so that it uses MinGW as the toolchain? It apparently detects MinGW as a toolchain, but when I create a project, two warnings already appear saying "error launching external scanner info generator". I'm assuming this is because it can't find the compiler program. Also, it doesn't detect any of the standard-library header files. Could these problems be because I'm using mingw-w64 rather than the standard MinGW?
I have Ruby working, but as for Python, it cannot find the interpreter nor the default system library. I have Python 2.7 already installed. I don't know how to tell Eclipse where to look for the files.
Note: I am on Windows 7 Professional 64-bit. I've heard of people on 64-bit versions of Vista having trouble getting mingw-w64 to work. I may be having the same problem. Ignoring Eclipse, when I try to compile a C file using gcc, it has trouble finding the libraries and includes.
Edit: If I set the path to /bin/ and /libexec/ via environmental variables, I don't get the initial errors when creating a project, but, what I want to know is, how could I set the paths via Eclipse? Also, even if I set the paths, the linker still can't find the libraries and includes. I went to Project > Properties > C/C++ Build > Settings and tried to set the libraries and includes that way, but it still couldn't find them (the libraries, at least)! Moreover, would I really have to do this for every project? This option isn't available in Window > Preferences.
As for the python part, I recommend using pydev: http://pydev.org/
It's the best eclipse plugin for python. From code completion, syntax highlighting, virtualenv support (http://pydev.blogspot.com/2010/04/pydev-and-virtualenv.html) and so on...
If you are into web development,
from javascript, php, html, python, ruby... you also might want to take a look at aptana.
http://www.aptana.com/
It's a eclipse based IDE with lots of goodies working out of thebox, like git and subversion plugins, pydev etc... aptana is (or was, I switched IDE) installable as a plugin in a regular eclipse)
Martin K. link looks good for mingw part.

Move Plugins between different Eclipse versions

I need to install several plugins to an eclipse that is running on a remote 64bit Linux machine.
I tried copying the neccesary plugins to the plugins and feature folder on the remote machine but it did not seem to work.
The approach I wanted to try out now was setting up a new Eclipse installation with all plugins and replacing the whole eclipse folder.
But as I am doing this I realized that I have to use a 32 bit Linux and Eclipse. Is it possible to install 32bit Eclipse and just move the plugins and features to the remote machine?
Do I need to consider other things?
Can you recommend any other approach that would help me?
UPDATE:
The problem is that I cannot just start eclipse on the remote machine. I can access it via ssh but not run eclipse and install plugins via the wizards.
I also have no 64bit linux to prepare a complete eclipse that I can simply copy.
So what I meant is that I have to prepare either an eclipse installation or maybe just plugin folder and move that from my 32bit architecture to the 64bit one.
I can download the current eclipse folder but I cannot run it. When I try to start it with ubuntu nothing happens. I believe it is because its a 64bit version and I got 32 bit architecture.
Don't do this. Not only are there are a number of plugins with native-compiled fragments (different for 32-bit vs 64-bit), but in recent versions, Eclipse will not even register features and plugins that are simply dropped in. You should install plugins explicitly unless you are moving the entire installation between machines with compatible architectures.
You can't run a 64bit binary on a 32bit system without some kind of virtualization software that does a complete CPU emulation. VMWare, VirtualPC, etc... don't do this. They virtualize the system, but not the CPU.
The other way around: a 32bit binary on a 64bit cpu, is generally possible, if the OS (and processor) supports such things.
I think this is feasible.
The architecture should not be the problem. Unless the plugins contain DLLs or .so libraries invoked through JNI but there are very few examples (swt is one example but there are very few of them).
As a matter of fact, the reason why you have OS/arch/GUI specific versions of eclipse is not the java code but the native launcher (eclipse.exe on windows and SWT), all the rest can go bck and forth from one machine to the other, regardless of the arch, the os or the wondows manager.
However, dropping jars in the plugin directory of eclipse is not the recommended way of installing plugins any more (since 3.3 ?). It might work but there is no guarantee.
To install the missing plugins you should download them from eclipse itself (help => install new software...). If you tell us the specific plugins you have problem with, we might be able to help you more precisely.
The best way to go forward is to list all the plugins on the source machine (either from eclipse (help => about) and look at names having specific hints at arch/os/gui. All these cannot be copied over. All the rest should be safe.
As I said, beware of swt. Subclipse has a JNI dependent configuration if you decide to use JavaHL. And there are also "false" plugins such as xmlSpy etc who are noting more than JNI adapters but these are not mainstream.