phillip.l...@russet.org.uk (Phillip Lord) writes: > I am having a problem running an application which requires an external > DLL. The strange thing is that it occurs only when build for i686 and > not x86_64 > > I am trying to build the Emacs pretests using mingw-w64 and msys2. On > windows, Emacs uses libXpm-noX4.dll. So, to enable a "standalone" > installation of Emacs, I have copied this file into the build directory > of Emacs, alongside emacs.exe. > > When launched from msys, both the x86_64 and i686 build start correctly > and load libXpm-noX4. I have checked directly within Emacs and they are > both loading the correct DLL from the same directory as the respective > versions of emacs.exe lie. > > Now, if I try and launch Emacs from windows explorer, the 64bit version > starts and loads libXpm-noX4. But, if I launch the 32bit version in the > same way, Emacs starts, but fails to load libXpm-noX4. > > I'm rather confused by this; I believe that libXpm-noX4 should be in the > DLL search path for both versions. But it appears not. > > Any help would be gratefully recieved.
First thing I would check is that the libXpm-noX4.dll you copied to the bin/ directory of x86 emacs is the x86 dll, not the x86_64 one. Somehow the system is refusing to load the dll you copied to emacs' bin/ and preferring the dll in the msys2 bin/, which should be identical. This makes no sense. You must also check that the dll's libXpm-noX4 depends on are reachable. On my msys2 install those are libgcc_s_dw2.dll and libwinpthread-1.dll. My old msys2 build of emacs says that emacs.exe depends on libwinpthread-1.dll, but not on libgcc_s_dw2.dll, so maybe you missed that one. You can also use Dependency Walker, execute Emacs from it and observe how it loads the delay-load dlls. Maybe doing this gives you some clue about what's happening. ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140 _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public