Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows 10 not loading DLLs for a release executable

Environment:

Windows 10 x64

Visual Studio 2008 (yeah, I know)

Trying to build a very simple x64 C++ application using gstreamer 1.0. The pipeline works just fine in debug mode (even writing images to disk) but the program crashes in release mode as soon as any gstreamer function is invoked. I've collected the following evidence for the release version:

  • Debugging in Visual Studio shows that the required gstreamer/gthread libraries are not getting loaded in Modules tab
  • Breaking the path to the gstreamer/gthread libraries by moving/renaming the containing directory (C:/gstreamer/x64_86/bin) has no effect in release mode. If I try this in debug mode, then the application complains at runtime that it can't find the required DLLs.
  • Running dumpbin /dependents on the release program shows that there is a dependency on gstreamer/gthread. Same holds true for the debug version.
  • Running application from the command line instead of VS produces the same result (a crash)

I noticed that Win10 is smarter and will warn you if multiple DLLs are missing at runtime (instead of just for the first one) but here I'm baffled as to why it's not even loading them and not warning me that they're missing. What else can I use to debug this problem?

like image 270
autonomy Avatar asked Jun 08 '26 22:06

autonomy


1 Answers

Things that have caused this to happen to me in the past:

  1. In a multi-project solution, all of the project build settings aren't synched up. In other words, if I build the solution in 64-bit Release configuration, does the Configuration Manager show all of the projects being built in that mode, or are some of them left out / or have the wrong build setting?

  2. The 32 bit version of a DLL is sticking around for some reason. This can especially happen if the build is happening in a non-default directory. In this case, just trash the build directory and rebuild.

like image 160
lfalin Avatar answered Jun 11 '26 15:06

lfalin