[C++] Code execution cannot continue because xxx.dll cannot be found. Reinstalling the program may solve this problem. (Solution)

Project scenario:

The phenomenon of "The code cannot continue to execute because xxx.dll cannot be found, reinstalling the program may solve this problem" often occurs during development.
Here is one, the best way to solve this kind of problem, which is very convenient and quick. See end of article!


Scenario 1: DLL not found when installing PCL

由于找不到pcl_common_debug.dll,无法继续执行代码,重新安装程序可能会解决此问题。

insert image description here
由于找不到pcl_io_debug.dll,无法继续执行代码,重新安装程序可能会解决此问题。

insert image description here
由于找不到pcl_kdtree_debug.dll,无法继续执行代码,重新安装程序可能会解决此问题。
insert image description here

由于找不到pcl_io_ply_debug.dll,无法继续执行代码,重新安装程序可能会解决此问题。
insert image description here

由于找不到pcl_visualization_debug.dll,无法继续执行代码,重新安装程序可能会解决此问题。

insert image description here

由于找不到pcl_common_debug.dll,无法继续执行代码,重新安装程序可能会解决此问题。

insert image description here

Scenario 2: DLL not found when installing opencv

由于找不到opencv_world345.dll,无法继续执行代码,重新安装程序可能会解决此问题。

insert image description here

Cause Analysis:

Reason 1: The environment variable is not set properly
Reason 2: The environment variable is ok, but the code does not find dependencies


solution:

Step 1: Find your missing DLL 将文件复制下来, if you don't know where the DLL is, you can use the everything tool to search.

insert image description here

Step 2: Open your system path C:\Windows\System32(it must be the System32 folder), and paste the DLL file just copied into the folder.

insert image description here

Step 3: Run your code again.

If your problem is solved, welcome to bookmark + follow + like! ! !

Guess you like

Origin blog.csdn.net/weixin_44244190/article/details/130489601