I'm building a Visual C++ executable. The Release output folder contains the EXE and the dependent DLLs. However, if I rename one of the DLLs and run the EXE, the EXE will fail load with exit code -1073741515 (0xC0000135) which means STATUS_DLL_NOT_FOUND. This is expected, however the cause for the load failure is non-transparent to the user since the EXE will just silently "crash" and not generate a helpful error message such as The DLL xyz.dll was missing. Some end users might genuinely miss a DLL or a Visual C++ Redistributable installation which makes debugging the problem hard.
Is there any way to tell the Windows application loader to provide an error message pop-up with diagnostics as to why the EXE failed to run properly? I have full control over the Visual Studio project settings and the source code. My project is configured as a command line application though if that could be the cause for no graphical loading failure feedback.
Here is a related question for a similar issue when running an EXE from Java.