using QtApplication in netbeans - c++

I have created a project using QtApplication in netbeans and I need to call a function in that project from a different project which is a normal C/C++ project.Can any body tell me how to do???thanks

Have you tried QProcess? It's used to start external programs and communicate with t

Last few days I was trying to integrate ns3 with Qt but now I have successfully integrated them.I am providing the solution so that it can be helpful to save time:
In order to integrate ns3 and Qt, I;
1)-created the dynamic library of the code written in Qt using IDE netbeans.
2)-In order to link and use that library I place the header file in the build/project folder so that I can use it easily.After that to link the dynamic library in ns3, I added following lines in the script file:
module.ccflags=['-wall','-O3'] 
module.lib=['QDynLib']
module.libpath=['/home/a/Documents/ns-allinone-3.16/ns-3.16/src/propagation/QDynLib/dist/Debug/GNU-Linux-x86'] 
module.linkflag=['-g']
module.rpath=['/home/a/Documents/ns-allinone-3.16/ns-3.16/src/propagation/QDynLib/dist/Debug/GNU-Linux-x86']
Here,I used the absolute path to locate the dynamic library.
Location of the Dynamic library;
/home/a/Documents/ns-allinone-3.16/ns-3.16/src/propagation/QDynLib/dist/Debug/GNU-Linux-x86/
Name of the library File:
libQDynLib.so
to find the explanation and detail of these python commands please refer to the link:
http://docs.waf.googlecode.com/git/book_15/single.html#_c_and_c_projects

Related

how to use v8 shared library in linux

I am working on a project that uses v8 engine. I have followed the instructions on v8 git page to compile it and generated some .so files. But now after that there are no more directions as how to proceed with those library files. I wanted to try out with the hello-world example provided but it uses static libraries(but we need dynamic ones). I couldn't find any relavant documentation nor tutorials on internet...
Could anyone point me to some directions as how to proceed to include those dynamic libraries to my program..
This tutorial helped me a lot:
https://medium.com/dailyjs/how-to-build-v8-on-windows-and-not-go-mad-6347c69aacd4
and also, if you don't want to have this kind of problem with the libraries, you can use the v8 NuGet:
https://github.com/pmed/v8-nuget
You can install directly into your project in VisualStudio and you don't need to make any reference.

Electron crashes with C++ addon using openssl library

I am trying to run with Electron a C++ addon that links to the openssl library. When the C++ code tries to access the library I get an exception: Procedure not found. I found another similar question here, but I could not manage to make it work, as the original poster said it would. I tried to link to a static compiled library from here, specifically libeay32MT.lib but when running under Electron it still crashes.
In bindings.gyp I have the library added like this:
"-l$(OPENSSL_ROOT)/lib/libeay32MT.lib"
Any ideas how I can make this work?
I managed to find the problem: I was also linking to node.lib inside the bindings.gyp. It wasn't necessary, but I "inherited" it from the Visual Studio proj file, where the node.lib was mandatory in order to compile the addon for node.
After removing the unnecessary library link to node.lib from the bindings.gyp the electron app worked just fine.

Add external library into current c++ project

I'm trying to use the xgboost library to basically translate a model I developed in R to C++.
I've not used an external library and other sources online did not help me much so decided to ask the question here to hopefully find the way to do it.
Here's the library I need to use in my C++ code: https://github.com/dmlc/xgboost
I'm using Visual Studio Ultimate 2013. I have a make file that I use to define my project.
I am looking for the proper way to use this library in my C++ code.
If you have ever used this library before, I really appreciate your help. Any hint will be appreciated.
To use the library, one needs to first build it. I could not manage to build the master branch. So, I decided to use the V0.4 instead. I built the solution in that branch using Visual Studio and it produced the dll and lib files. One can then import the .dll file by using Add_library to add it via Cmake. After Add_library, the include directories need to be added by include_directories command.
I need to generate .a and .so files in the end. I'm working in windows and could not find a way to generate these files, yet!
So I found the way to resolve this issue. I shared it in another answer
Add an external library (e.g., Eigen) via CMake
Hope this helps people who are looking!

Trouble Linking Matlab C++ libraries/headers with Xcode 7.3

I'm trying to write a program in C++ to write static arrays and matrices to .mat files so that I can load them into Matlab, and I'd also like to be able to read them. I've done a lot of reading and I'm aware that there's some framework I need to properly set up in XCode in order for things to work. I'm using Matlab R2015b and Xcode 7.3.
I'm modeling my code initially to be simple like what the author mentions in Reading data from matlab files into C but I can't locate my libraries. The folder /glnxa64/ does not exist on my machine. I know that my headers I want to include are in applications/MatlabR2015/extern/include for mat.h, matrix.h.
I have two problems: Under my project settings in XCode, what do I modify to make sure my project finds mat.h and matrix.h, is it under the "Precompiled Headers Cache Path" or elsewhere? Also, where do I find those library files and how do I link them in XCode, is it just under the Project Build Phase link binary with libraries?
Thanks for the help!
I found the solution to the second part of my question. The first part was just me messing with the project build settings instead of the target build settings.
The folder for the libraries that Matlab has depends on what operating system and version of Matlab you're on. Opening matlabR2015b.app by making the finder show package contents, then navigating to applications/MatlabR2015b.app/bin/maci64/ is where the library binaries are located on my machine. The name maci64 changes depending on the OS (since I'm on a mac 64-bit OS, I believe that's where my path name came from) and manually paging through the list of libraries found it, since using the file search doesn't really work inside a package.
My code still won't compile because it looks like I need to include all of the right codependent libraries, and I don't know which other ones I need (I only included libmex.dylib and libmat.dylib), but I found where the libraries are stored.

ArUco program from scratch

I'm using the ArUco library with OpenCV (more information here) but I can't find a way to build and run a program from scratch.
Once I installed the library I have access to different examples but if I want for instance to create a new file and add the library headers inside it, how can I compile and run it ? (with a command line or IDE, anything is fine)
Thank you
I sent and email to the library's author and he added clear instructions at the end of the project webpage :)
It seems you need to learn how to use your IDE's, compilation tools and general compilation basic stuff. This is not a question related to Aruco, or mostly any other tags you have set.
Try to lean CMake first, 'cause Aruco compilation is based on CMake: http://www.cmake.org/
You can start by just editing the aruco_simple example.
For a IDE that works right away with CMake you can try either Qt Creator >3.1 or KDevelop. Both free.