I have made a simple program with NetBeans in C++, now that is finished I would like to use it outside the IDE, how should I proceed? I have been looking around but didn't get anything clear. Should I make an installer? (its not such a big program so I dont know if just the exe could work - although I have found none in the project directory)
Thankyou very much in advance :-)
Especially if you have a small project, NetBeans packing options are very useful.
To create a package:
Right click on your Project -> More Build Commands -> Build Package
To configure what has to go into your package and what not, you can customize it here:
Right click on your Project -> Properties -> Packaging
Make sure you have libs, required files etc. selected in Packing Files, so everything that's required by your application is together.
Note: Per default, a Tar-Archive is used, Zip, RPM, Debian Packages and some more are possible too.
Related
I'm trying to do something simple: save data in Apache Parquet format in C++. However, I cannot figure out how to properly link the Apache Arrow library to my project in order to use the necessary #include<".h"> headers. I haven't used C++ in decades and I wasn't very good even back then, so this is out of my league.
I've used NuGet (for pthreads library) and have physically linked libraries using the Project Properties of Visual Studio 2019 on Windows 10 (for Npcap library), but following the Apache Arrow instructions (https://arrow.apache.org/docs/developers/cpp/index.html) is currently beyond me.
So far I've installed Git and CMake and I can get CMake to put arrow VS Project files into a ./build folder I've created, but I cannot run any example nor can I link the header files. I've tried adding a VS Project to the 'arrow' solution in the build folder, but I never got that code to compile. In previous attempts I've used CMake through VS as well as used Ninja to try and build the libraries. But for the most part, I am straight-up guessing on pretty much every step of this process.
Some questions that come to mind are: do I even want to specify the "Visual Studio 16 2019" generator to CMake or should I do something different? How do I use the files that were built? Do I need to modify the CMakeLists.txt files included in the arrow download? Do I need to write a script for the build or is it preferable to run from the command line?
Regarding the Optional Components of the build; I'm pretty sure I should have -DARROW_PARQUET=ON but what about -DARROW_PLASMA=ON? It's related to Shared Memory Object Store and in order to save as a parquet file I'll need to load my data into an arrow Table in the memory, so is this applicable? What about the other 50 or so options?
I apologize in advance for my naiveté on this subject and appreciate any help or advice. Thank you.
I am trying to follow some insane complicated steps in order to be able to create C++ unit-tests for C++ code in eclipse (I am utterly new to eclipse). These steps state to exclude some source files from using in the built - which makes sense to me. However, in my eclipse I do not see any Exclude from built option when right-clicking on the source file. Also, neither this answer nor this answer do work, as I do not see the mentioned options in the list of things when I right-click on the source file.
So how to exclude a source file from a built?
P.S. The Version of eclipse seems to be Luna 4.4.0.
(Or, even better: If anyone knows an easier way to set up eclipse with ANY unit-testing framework in a SIMPLE way,- or knows a different Linux framework to start developing C++ projects with unit-testing right away without trying to set up things in unknown and complicated ways for weeks before starting to actually code something - ideas are VERY VERY welcome...)
I ran into a similar problem.
The C/C++ perspective of Eclipse Luna (4.4) is missing the contextual menu "Exclude from build".
I solve my problem by using the java perpective:
Window -> Open Perspective -> Other... -> Java(default)
Navigate to the file/folder you want to exclude
Right Click -> Resource -> Exclude from build
Then you can switch back to the C/C++ CDT perspective
Project Properties> C/C++ General> Path and Symbols
Tab Source Location
Select the source folder
Click the Edit Filter button
Add the file you want to exclude
I've tried this and it worked on Eclipse:
Right Click the file > Properties ... > Resource > Attributes : Derived.
(Eclipse Indigo)
Hope that helps.
I am using MARS eclipse version.
You have to create a build configuration for each component you are building.
Here is how to do that: multiple_execs
Then for each source file that you do not want included in that build; you right click on that source file and then select Resource Configuration and select Exclude From Build. Then you check the box of the build configuration you created above that you do not want the source a part of.
Here is YouTube video showing this: exclude files from a build
I've got an XCode 4 project that has an additional dependency project in it. The dependency project creates a static library I need for the major project.
I'm trying to add the library from the Target->Build Phases->Link Binary With Libraries, choosing the static library in my workspace.
Problem is every time I do that, the build settings "Library Search Paths" is appended a path to the build of the iphoneos build. When I try to compile for simulator, that file is ignored as it not meant for i386 architecture and the build fails.
I've been searching like mad, not understanding what I'm doing differently. Everywhere I look, it seems like XCode should be doing some magic to link simulator with simulator and device with device - But for me it always adds the specific path to either the device or simulator.
(I've tried using two targets to differ them, and that worked, but it's not an ideal solution at all. I have to change 2 targets everytime instead of 1.)
Hope I was understood,
pleeeaaaaase help :)
Oded.
My colleague found the answer eventually -
In XCode 4 the default is to build all projects to a shared building folder. Me being fixated with XCode 3, switched it to the old method in which the build folder is in your project folder.
Turns out switching XCode to build in a single unique place, allowed the magic to happen to and to the corresponding builds be built together. I've been told it's exactly what it's meant for, but have no link to the reference.
XCode Menu -> Preferences -> Locations -> Build Location:
- Place build in derived data location (recommended)
- Unique subfolder
Cheers,
Oded.
I'm making a DLL (and probably a Linux port at some later date) in C++ using eclipse. The situation is as follows: I am trying to make two separate build configurations, one that will build a DLL and one that will build an executable CppUnit test. Currently I have all of the DLL build working, and I can make a separate project to test the DLL with; however, I was wondering if there was any way to do this all in one project.
Help on this matter would be greatly appreciated!
Thanks,
Chris
Well, I found out how to do it, so if anyone else stumbles across this...
If you go into "Project->Properties->C/C++ Build->Settings", then select a debug configuration (or create a new one). Go to the "Build Artifact" tab, and change the "Artifact Type" to executable.
Now to avoid having all of your source code compiled into all Build Configurations (such as your main() being built into a DLL, which doesn't make much sense), go to "Project->Properties->C/C++ General->Paths and Symbols". Select your build configuration and go to the "Source Location" tab. Here you can add new source folders/remove source folders that already exist.
I have a large existing c++ codebase. Typically the users of the codebase edit the source with gvim, but we'd like to start using the nifty IDE features in Eclipse. The codebase has an extensive directory hierarchy, but the source files use include directives without paths due to some voodoo we use in our build process. When I link the source to my project in Eclipse, the indexer complains that it can't find any header files (because we don't specify paths in our includes.) If I manually add the directories from the workspace to the include path then everything works wonderfully, but obviously adding hundreds of directories manually isn't feasible. Would there be a simple method to tell Eclipse to look anywhere in the project for the include files without having to add them one by one? If not, then can anyone suggest a good starting place, like what classes to extend, for writing a plugin to just scan the project at creation/modification and programatically add all directories to the include path?
The way that CDT manages build paths is by looking at the .cdtbuild xml file in the base of your projects directory (it might be a different name on windows... not sure)
In this you should see something like
<option id="gnu.c.compiler.option.include.paths....>
<listoptionValue builtIn="false" value=""${workspace_loc:/some/path}$quot;" />
<listOptionValue ... />
...
</option>
this is where all the build paths that you configure in the gui are placed. It should be pretty easy to add all the directories to this using a simple perl script to walk the project and generate all the listOptionValue entries.
This is obviously not the ideal method. But im curious, what build system are you migrating from, if it is make based you should be able to get eclipse to use your make files.
This feature has already been implemented in the current CDT development stream and will be available in CDT 6.0, which will be released along with Eclipse 3.5 in June 2009.
Basically if you have an #include and the header file exists somewhere in your project then CDT will be able to find it without the need to manually set up include paths.
If you need the feature now you can download and install the latest CDT development build.
Eclipse Bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=213562
Latest CDT 6.0 Builds: http://download.eclipse.org/tools/cdt/builds/6.0.0/index.html
From reading the this Eclipse CDT FAQ entry, it sounds like Eclipse can automatically generate a list of include directories if you start your build from within Eclipse and if your build outputs the gcc / g++ commands before actually starting gcc / g++. You can change how Eclipse starts a build by going under Project Properties then selecting the C/C++ Build category and looking for the Build Command option on the right side of the dialog.
Depending on the amount of voodoo you are doing in your build process, then Eclipse may not be able to correctly parse your source files, especially if you have similarly named headers for different source files. If you really want to take full advantage of Eclipse you're going to need to make sure that with whatever setup you have you aren't going to be confusing the parser. Personally I would recommend having a simple layout and build process.
As for the question at hand, adding the directories one by one is pretty much your best bet.