Visual Studio 2017 dependent .dll not found

13,817

Please ensure that the speech.dll is present in the same folder that your project.exe is located.

Windows searches for the dlls in the following order:

  1. Your application's folder
  2. \windows\system32
  3. etc, according to the Windows defined path

Please ensure that the dll is present in any of these folders, otherwise you will get an error that the dll missing.

Note: If you are debugging then ensure that you have set the Working Directory for debugging correctly to point to the folder containing your project.exe and the dll.

Share:
13,817

Related videos on Youtube

Brandt Smith
Author by

Brandt Smith

Updated on June 04, 2022

Comments

  • Brandt Smith
    Brandt Smith almost 2 years

    I am working on a speech recognition children's game using an external API that I want to use on my project. Said API has lib files, dll files, header files and cpp files. As of right now I have successfully added the library files (at least I think I have) to my project directory, added all the necessary header files to external dependencies and I am left to add two .dll files to my project. First, I add my Audio.dll file and it gets added perfectly with no issues. Second, I add my Speech.dll and here is where my problem arises. I don't receieve any errors in my debug error list, however, the output of my project looks like this:

    'Project.exe' (Win32): Loaded 'C:\Path\Project.exe'. Symbols loaded.
    'Project.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
    'Project.exe' (Win32): Loaded 'C:\Windows\System32\mscoree.dll'. Cannot find or open the PDB file.
    'Project.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.
    'Project.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
    'Project.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'. Cannot find or open the PDB file.
    'Project.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'. Cannot find or open the PDB file.
    The thread 0x3274 has exited with code -1073741515 (0xc0000135).
    The thread 0x198c has exited with code -1073741515 (0xc0000135).
    The program '[17020] Project.exe' has exited with code -1073741515 (0xc0000135) 'A dependent dll was not found'.
    

    After this I get a popup System Error: The code execution cannot proceed because Speech.dll was not found. Reinstalling the program may fix this problem.

    No mention of Audio.dll, however, Speech.dll which is in the same folder as Audio.dll isn't being found. I tried reinstalling the .dll, I tried reinstalling Visual Studio 2017, I tried Add->Existing Item->.dll, I tried adding the dll to the project path where the .exe is and I've tried adding it to every folder/subfolder all receiving the same sequence as my output.

    My question is, how do I get my visual studio 2017 project to recognize my Speech.dll file?

    • user1703401
      user1703401 almost 7 years
      It is the most basic possible mishap when using a 3rd party library. Google "visual studio show loader snaps" for hits.
    • Brandt Smith
      Brandt Smith almost 7 years
      Thank you very much! I am knew to c++ and was not entirely aware of this. This helped me figure it out.
  • oarfish
    oarfish over 3 years
    It appears that the location being in Path is actually not sufficient for VS to find it.