LabVIEW using C DLL using OpenCV DLL - opencv

I am developping a C++ DLL with C wrapper to be able to use it in different languages. For now, I can use it in C# and Python, and before to find how to do it on MATLAB, I have to find the way to read it on LabVIEW.
I am using Visual Studio, so I installed openCV on C:\, added the include directory and the .lib files to my project, created a new environment variable, and in my DLL I use it using #include <opencv2/core/core.hpp>. All this in 32 bits of course because LabVIEW is very bad on 64 bits.
But, when I create a node with "Call Library Function Node", after setting inputs/outputs, I click on OK and LabVIEW tell me it didn't find the dll associated to OpenCV.
I am a total newbie on this field (DLL) so I am not aware of what I have to check or add in LabVIEW.
Thank you in advance.

I'd suggest you to use Open CV static libs instead of DLL. You can download OpenCV source from opencv.org and download latest version of CMake from cmake.org. CMake will generate Visual Studio solution and other required files from platform-independent source files. So you will be able to change Visual Studio project target from DLL to static LIB and build static libs of Open CV on your own PC.

I finally managed this issue. I only had to copy/paste the DLL files of OpenCV on the same directory of the LabVIEW library.

Related

How can I link a static lib generated by DCC32 with the option -JL in C++builder?

I'm trying to use a static library in my C++ Builder project. The lib is created by using DCC32 to compile Delphi source code with -JL option. My Delphi source code is design as a "Designtime and runtime" package, which mean s all the code is built into one package. I want to know how can I use this static library in our C++ Builder project? Thanks in advance.
As David said, the Delphi compiler can't create static lib files at all. What you are trying to link to is an import library for a designtime/runtime package.
Delphi (and C++Builder) packages are not static libs, they are DLLs with a lot of extra information onboard, which makes it easy for Delphi and C++Builder code to link to them and the types inside. They are more or less equivalent to C# assemblies (guess where the C# people got the idea ;-).
To use such a package, in case you really want to use them, select the "build with packages" option from the project options and select this package too.
But if you want to create a single, standalone application, you don't build with packages and the Pascal files get linked into your application as if they came from a static library. But instead of specifying one lib file, you simply specify the .pas files in the project manager, i.e. you simply add the bunch of .pas (or .obj) files to your application directly.
The project will take care of compiling the Pascal files and linking them to your application.
Note that to install components into the IDE, you need a design time package (and that might link to a runtime package). But you don't need packages for your application.
These are some steps for your consideration:
Use -JP to generate obj files
Add these obj files in link step into your ilink32 command
If you use IDE and do not which ilink32 params then you may consider procexp or procmon to see these params.

Tool for repackaging library from windows lib with embarcadero tlib?

I've bought a wonderful audio library from CricketTechnology with source. I cannot dump ck.lib with tDump64 and also tLib64 doesn't work for me. But windows LIB lists the content of ck.lib and can probably extract the .obj files. My idea is to extract all the .obj files listed and to repackage them with tLib. Is there a tool? I want to use the wonderful library with Delphi and have added some functions to the source code that are free from C++-objects.

Does graphics32 works in c++ builder XE2?

I have installed graphics32 1.9.1 1581, compiled and added the GR32_DSGN_RSXE2 package.
But it has no .h files and your components and components folders are visible only in Delphi projects. Its implementation for C++ has stoped in builder 6? There is a way to use it in cbuilder XE2? There is a substitute for?
If you only get the packages and not the full source, then you are out of luck. If on the other hand, they provide the source, you can usually just rebuild them with the right settings to generate the files needed for c++.

List of all needed OpenCV dlls by each EmguCV dll

I am trying to locate dependencies of each EmguCv dll using a decompiler. However I don't want to miss anything because those OpenCv dlls maybe calling each other inside external calls.
Is there a list somewhere? I have tried EmguCV forums but I couldn't get an answer.
Open it with Dependency Walker:
Scans 32-bit or 64-bit Windows module (exe, dll, ocx, sys, and others), and builds a hierarchical tree diagram of all dependent modules.

Can SQLite library embed (Link) to Delphi executable file?

I am wondering if we able to embed SQlite library into Delphi executable file and we may deploy our application as single .exe file without any SQlite dll file.
The embed is not keep the sqlite dll file into resource but link to Delphi executable file.
I have not tried this component out, but I plan to in the future
Delphi Inspiration - DISQLite3
There is also
Synopse OpenSource SQLite3 Framework
A Freeware version is available too
We have compiled SQLite3 with Borland's free command line tools C compiler and the resulting OBJ file we linked in Delphi with {$LINK 'OBJS\sqlite3.obj'}, and written the pascal wrappers for the functions we needed.
There was a problem resolving some standard C library functions when linking but we re-implemented them in Delphi.
I had the same problem and this is the solution I came up with. Maybe it can help you. Just include sqlite3 and you then have direct access to the dll functions. I used the same methods that have already be outlined:
http://simvector.com/download/delphi_sqlite3.zip
The DLL is just encoded in source form and the DLLLoader unit loads it at runtime. The end result is no extra DLL in your distro at the expense of it all being loaded into memory at once vs parts loaded on demand via the OS.
We needed it to work as normal, yet no extra dll in distro. So works for our needs.
Anydac SQLite driver has statically linked SQLite engine. It is commercial library, although. They has an article about anydac and sqlite.
Delphi can link .obj files, thereby if you have them available (or source code to compile them), you can link them into an executable. But you can't to that with the SQLLite dll.
IIRC DISQLite 3 does exactly that, check it.
You can download the SQLite open source and compile it into any environment that can compile vanilla C code. It's not especially hard.

Resources