I have a Visual Studio 12 project; source code written in C++; it's an OpenCV project. I want to give my compiled program to someone else, but, on other PC, I getting an error message about missing some dlls. My program using many OpenCV (maybe, not only) dll's. How can I resolve that problem? Maybe in VS 12 available an option to include all dll's in .exe? It's a pretty similar question without proper answer: include dlls in visual studio c++ 2008
You can choose between creating an EXE or a DLL when writing Dot NET code. Both of these include executable code, however, DLL and EXE operate differently from one another. The EXE will create its own thread and reserve resources for it if you run it.
Yes, the Core and Utils code will be duplicated. Instead of building them as static libs you can build them as dlls and use anywhere. Save this answer.
DLLs themself can not be "statically linked" into an executable; that completely defies their purpose (well, actually you can use some really weird voodoo tricks to actually do it, but this is neither recommendable nor should you try it if you have to ask this question).
The simple solution would be to identify all the DLLs your program requires (just starting the program in the Debugger will generate a log file listing them all) and copy those DLLs into the same directory as the EXE resides in; as it happens the directory with the EXE file in is also the first directory where the system looks for DLLs before advancing to the standard system directories in default configuration. Package it up and distribute it that way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With