You're encountering a common issue when distributing compiled applications (.exe files) across different Windows environments: missing dependencies, often in the form of dynamically linked libraries (DLLs). Here's a breakdown of why this is happening and how you can fix it:
🧠 Why This Happens
When you compile your Visual Studio project into an .exe, it may rely on several external DLLs that aren't included in the .exe itself. These DLLs are usually:
- Visual C++ Redistributables
- .NET Framework or .NET Core/5+/6+ runtime (depending on your project type)
- Other third-party libraries you might be using (e.g., OpenCV, Boost, etc.)
On your Windows 11 laptop, these dependencies are likely already installed, which is why it runs without errors. But on the Windows 10 machine, they may be missing — hence the "weird DLL is missing" errors.
🔍 How to Identify Missing DLLs
When PowerShell says something like:
The program can't start because VCRUNTIME140.dll is missing from your computer.
That’s a clear sign that a Visual C++ Redistributable is missing.
But if the error mentions obscure or unexpected DLLs, try this:
1. Use Dependency Walker (depends.exe)
- Download Dependency Walker (older tool, but still useful).
- Open your
.exe in Dependency Walker.
- It will show all the DLLs your application depends on and highlight any that are missing.
2. Use Process Monitor (ProcMon)
- Download Process Monitor.
- Run your
.exe on the Windows 10 machine while monitoring with ProcMon.
- Filter by your process name.
- You’ll see which DLLs it tries to load and fails (with "NAME NOT FOUND").
3. Use dumpbin (Visual Studio Tool)
If you have Visual Studio installed:
dumpbin /dependents YourProgram.exe
This lists all dependencies. You'll need to cross-reference them with what's available on the target machine.
✅ How to Fix It
Option 1: Install Required Visual C++ Redistributables
Your app was likely built using Visual Studio and depends on the VC++ redistributables.
Install both x86 and x64 versions on the Windows 10 machine — especially if you're not sure which one your app uses.
⚠️ Even if your app is 64-bit, some dependencies might be 32-bit.
Option 2: Static Linking (Advanced)
You can configure Visual Studio to statically link the runtime libraries instead of dynamically linking them. This way, the DLLs are embedded inside the .exe.
Steps:
- Right-click your project → Properties.
- Go to: Configuration Properties → C/C++ → Code Generation
- Change Runtime Library to:
/MT (Release) or /MTd (Debug) for static linking.
Note: Some third-party libraries may not support static linking, so test carefully.
Option 3: Include Required DLLs with Your .exe
If you're using third-party DLLs (not just VC++ redists):
- Copy those DLLs into the same folder as your
.exe.
- Make sure the directory structure matches what the app expects.
Option 4: Create an Installer
Use tools like:
These can bundle your .exe with the necessary redistributables and DLLs and automate installation.
🧪 Quick Checklist
| Task | Status |
|---|
| ✅ Checked which DLLs are missing | |
| ✅ Installed required Visual C++ Redistributables | |
| ✅ Tried running Dependency Walker or ProcMon | |
| ✅ Considered static linking | |
| ✅ Included third-party DLLs (if any) | |
🙋 Example Scenario
If PowerShell says:
SideBySide Configuration is incorrect.
or
MSVCR120.dll is missing
➡ That’s almost always a Visual C++ Redistributable issue. Install both x86 and x64 versions of Visual C++ 2013 Redistributable (v12.0).
Summary
Your issue stems from missing runtime dependencies, particularly the Visual C++ Redistributables. Installing the correct versions on the Windows 10 machine should resolve the problem. For more robust distribution, consider static linking or packaging dependencies with an installer.
Let me know if you want help analyzing a specific DLL error message!