Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trouble generating a deployable binary for a C++ wxwidgets project using Visual Studio

I’m having trouble generating a deployable binary for a C++ wxwidgets project using Visual Studio. After the build completes, the exe that is generated does not seem to get installed in any other Windows machine. Visual studio 2019 is used to create GUI library with openCV included in it. I’m trying to create a standalone executable .exe to run it in any other Windows computer without installing visual studio or opencv in it. Earlier, while opening the executable file in other computer, it gave error that dll’s are missing for openCV and wxwidgets. So, I have copied the required dll’s from the directories of openCV and wxwidgets bin folder. Now, when I try to execute the exe file, it shows the following error. Kindly help me to resolve this issue.

error-1 error-2 error-3 error-4

like image 545
Rahul Avatar asked Nov 23 '25 22:11

Rahul


1 Answers

Applications built with the C/C++ runtimes dynamically linked (/MD[d]) require the appropriate x86 (32-bit) or x64 (64-bit) VC++ redistributables on the target machine. They can be installed from The latest supported Visual C++ downloads, or they can be included alongside the application for local deployment.

Also, be sure to only send out non-debug (Configuration = Release) builds.

MSVCP140D.dll
VCRUNTIME140D.dll
VCRUNTIME140_1D.dll
ucrtbased.dll

The 'D' suffix in the names of those missing DLLs stands for "Debug". Those are the debug C/C++ runtime DLLs, which are used by the Configuration = Debug builds, and are installed as part of the Visual Studio setup. They are to be used during development, but not otherwise deployed, per Determining Which DLLs to Redistribute:

Debug versions of applications and the various Visual C++ debug DLLs are not redistributable.

like image 70
dxiv Avatar answered Nov 25 '25 11:11

dxiv