We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

tjrob
Posts: 2
Joined: Tue Feb 16, 2016 9:17 pm

how to determine missing dll?

My program is built on Windows 10 using Visual Studio 2015 in 32-bit Release mode. It runs correctly on my build machine. I package it up using Advanced Installer 13.7 and install on a test machine (a bare Windows 10 installation). It fails "The application was unable to start correctly (0xc000007b)..."

In the past that has always meant I omitted a required DLL. So I run the Dependency Walker on the program and get HUNDREDS of missing DLLs. This happens on BOTH my build machine (where it runs correctly) and on the test machine.

Note the package includes Merge Modules for "Visual C++ 14.0 CRT (x86)" and "Visual C++ 14.0 CXXAMP (x86)" -- the only ones that looked relevant; this program does not use MFC in any way (it is portable to Linux, Mac, and Windows). It does use Qt, and I include its DLLs and plugins in the package. In the past I have successfully built and installed this program using Windows 7, Visual Studio 2013, and Advanced Installer 12.x.

So how can I determine which of those "missing" DLLs are required, and which are not really needed? Many BUT NOT ALL of them are in "C:\Program Files (x86)\Windows Kits" -- and it is CRAZY -- "c:\windows\system32\KERNEL32.DLL" has a dependency on API-MS-WIN-CORE-RTLSUPPORT-L1-2-0.DLL which looks just like the names of files in WindowsKits, BUT IS NOT ANYWHERE ON MY BUILD MACHINE. The list also includes two 64-bit DLLs in this 32-bit build.

Note: This is a large scientific program that uses several large libraries with dozens of DLLs, one of which is 32-bit only. The program installs and runs correctly on both Mac and Linux, so I know the list of my DLLS; the problem is almost certainly in VC++ stuff. As my Windows machines are really VMs on a Mac, I could use UNIX tools to determine the differences between the lists of missing DLLs on the Windows build and test machines; I added every one of those into my package, but it still won't start on my test machine.

How is this supposed to work?
tjrob
Posts: 2
Joined: Tue Feb 16, 2016 9:17 pm

Re: how to determine missing dll? - workaround

This is NOT a missing DLL -- that gives a different error message. This is a 64-bit DLL being used in a 32-bit application. specifically msvcp120.dll and msvcr120.dll.

Here is the source of that problem -- WINDOWS IS SCREWING UP A COPY!!!!

Code: Select all

C:\Windows\System32>dumpbin /headers msvcr120.dll | more
Dump of file msvcr120.dll
FILE HEADER VALUES
             14C machine (x86)
              
C:\Windows\System32>copy msvcr120.dll \users\tjrob
        1 file(s) copied.

C:\Windows\System32>cd \users\tjrob
C:\Users\tjrob>dumpbin /headers msvcr120.dll | more
Dump of file msvcr120.dll
FILE HEADER VALUES
            8664 machine (x64)
So when I copied those DLLs into my app's bin directory they got MAGICALLY changed into 64-bit DLLs, and of course that fails. (I actually used CMake to do the copy, but the result was the same.)

The workaround I found is to not copy them in, but rather add them individually from C:\Windows\system32 into my bin directory, in the "Files and Folders" section of my .AIP.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: how to determine missing dll?

Hello and welcome to our forums,

Thank you for your follow up and for sharing the found solution with us.

Certainly this info will be useful to future users encountering similar issues.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”