OpenCV application on MS visual studio c++ needs a DLL? - opencv

I want to create a simple application with a few static libraries from OpenCV. I managed to link all necessary .lib files, including opencv_world300d.lib, but at run-time it requires the opencv_world300d.dll. I can add the directory where this DLL is, but I just want a single .exe (no additional files). I clicked everywhere the option \MT or \MTd (no dlls)
How can I achieve this?
It is for x86, visual studio 2012 (v110) and OpenCV, version 3.0.0. In the lib file there is a reference to the dll, unfortunately.

OpenCV application on MS visual studio c++ needs a DLL?
Not necessarily. You can link to OpenCV static libraries, which are in the folder staticlib, under OPENCV_DIR/build/.../staticlib.
The libraries in the lib folder are for dynamic linking, so you need also the .dll.
You can have a look at this answer for the step-by-step configuration.

Related

What is the Microsoft.VisualStudio.Platform.WindowManagement.dll and where can I get the official ones from Microsoft?

I am looking for access to some functions in the DLL I mentioned above. I am not aware of any Nuget package that provides this DLLs.
So my question is, where do I get the latest version of this .dll from MS, and are they compatible with plugins targeting VS2019 and later?
Thanks for the answers, I am new to stack-overflow and probably didn't explain myself better.
I am developing a Visual Studio Plugin which closes some Document Windows in VS. I found some repos of VS plugins on Github which has a reference to this .DLL, and they use it to close all clones of Document Windows by casting the IVsWindowFrame to WindowFrame class belonging to this DLL.
As pointed out in comments: I found the DLL in my C: drive under this path: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE

Security of using .bpl as external modules

I'm still new with delphi and I developed an application that loads at runtime bpl files following this guide http://edn.embarcadero.com/article/27178
The bpl files will be in the same folder as the main app, and I was wondering what is the security in doing this?
I found this question External modules security but it doesn't fully answers mine.
I mean, if the clients copy these bpl files and give them to other developers, can they use/access them if they have the same delphi version? Or in some ways access the source code?
These are just executable modules like .exe or .dll modules. They are exactly as secure as any other executable module.
If the clients copy these bpl files and give them to other developers, can they use/access them if they have the same delphi version?
Yes.
Or in some ways access the source code?
No. Compiled bpl package files do not contain source code.

Casablanca - REST C++ SDK, used in Embarcadero RAD Studio XE5

I need to do a http get in RAD Studio XE5 C++. The tutorials on the RAD Studio site discuss a RESTCLient that is not included with the version I have. I found the Casablanca project, which is specifically for Visual Studio, and I made a small program in VS that does the simple http get and handles response in the way I need.
What do I need to do to successfully use Casablanca from within RAD Studio?
There are the steps I have taken so far.
Compiled Casablanca in Visual Studio 2013
Copied the .lib and .dll over to a folder in the RAD Studio project
added that folder to the link path in the RAD Studio project
added the .lib to the project
added dll imports to classes that should be in the .lib to the .cpp I want to use the function in.
class __declspec(dllimport) http_client;
class __declspec(dllimport) filestream;
class __declspec(dllimport) producerconsumerstream;
class __declspec(dllimport) rawptrstream;
There was a OMF error, and I used a tool that came with RAD Studio to convert the .lib, that got past the error.
I don't know how to declare the dll prototype's of the functions, because the returns types are from a namespace in the library itself so they aren't recognized. http_client is an unrecognized structure.
I tried this as well without the class keyword.
DLLs that export classes are not portable across compilers. So you will not be able to use a Visual Studio compiled DLL in C++Builder if it exports classes. Either flatten the DLL interface to export plain C-style functions instead (and then use C++Builder's command-line IMPLIB tool to create an import .lib file for the DLL, do not use the .lib file created by Visual Studio), or else find another solution.
For instance, C++Builder (and Delphi) ships with Indy 10, which has a TIdHTTP component. You can use its TIdHTTP::Get() method to perform an HTTP GET request. But if you need to actually use REST, you might be better off simply upgrading your XE5 to a version that has TRESTClient available (BTW, Embarcadero's REST classes use Indy internally).

F#, Import library, Visual Studio, offline. How?? Stanford NLP

F#/ Visual studio pros, please help!
How to import libraries? Please just give me an example. How about java.io?
For Java I have tried to install thisbut didn't work.
It looks like you're trying to use the Stanford NLP libraries, these are available on NuGet and can be installed by right clicking on the project and selecting manage nuget packages. From there it's possible to add the references to the project. The .nuspec files which you've referenced in your project are for packaging up the libraries. So in your case, the nuspec filenames will be the thing that you search for in Nuget.
The Nuget website offers a guide for how to install packages here
.NET (which F# uses) and the JVM (which Java) uses are both managed code environments with many of the same capabilities.
But that are mutually incompatible.
While 3rd party tools might be able to bridge that gap (for at least simpler cases) there will be far more work to do that just referencing a .jar in Visual Studio.
Almost certainly better to use an equivalent .NET package (for IO look at the System.IO namespace (the necessary .NET assemblies should already be referenced).

Does a simple delphi form app needs any libraries or dependencies to deploy?

I need to code a simple form application and I want to make it easy to deploy (without installing libraries or dependencies), I don't want to use visual studio cpp or csharp because clr apps compile with .net frameworks and I have no much experience with mfc and dialogs.
So I was wondering which libraries does a simple delphi vcl forms app (those using TForm) use, because I've never had to install anything to run simple delphi apps.
Delphi embeds everything in the EXE file. There are libraries that depend on BPL or DLL files, but for a simple application, the EXE is all you need...

Resources