0

I'm trying to use the derelict-vorbis library for my D application. I have downloaded both the Vorbis and Ogg libraries from xiph.org and successfully built them using Visual Studio 2015 (Community). I used the VS2008 solution (converted) as the VS2010 one wouldn't open correctly.

Derelict's Shared Library loader tells me the DLL can't be found, even when it exists right where it says it doesn't. Derelict Error I dug into the code to find that it uses the LoadLibrary windows function, and after some googling it appears that it will fail with the same error when there are missing dependencies from the DLL.

I opened up libvorbis.dll in Dependency Walker and there are a TON of missing DLL's: Missing DLLs I'm new to stuff like this, did I build Vorbis and Ogg wrong or is my system broke?

The DLLs have been built using the "win32" configuration, and my D application is compiled for 32 bit.

EDIT: PEStudio shows that libvorbis.dll uses some api-ms-win-crt-* dlls that I can't find in C:\Windows. I also tried profiling with DependencyWalker, but it stops responding well before the application attempts to load the DLLS.

Thanks in advance.

jython234
  • 315
  • 2
  • 9
  • Many of these DLLs are in `C:\Windows\System32` for me (but not all of them), however I've never seen anything link against them, so I suspect your libvorbis build is wonky. – Cauterite Aug 19 '16 at 22:28
  • Actually, you may be experiencing a bug in DependencyWalker, see: http://stackoverflow.com/questions/36240215 . Try scanning the DLL with something more modern (such as [PE Studio](https://www.winitor.com/) ) to get a more accurate list of its dependencies. – Cauterite Aug 19 '16 at 22:31
  • Did you try using DW's profile mode (F7)? – torhu Aug 19 '16 at 22:33
  • @Cauterite PEStudio says that it uses some api-ms-win-crt-* dll's which I can't find in C:\Windows. Could that be an issue? – jython234 Aug 19 '16 at 22:42
  • @torhu Tried that now, but DW stops responding well before my application attempts to load the DLLs. – jython234 Aug 19 '16 at 22:43
  • I'm gonna try build libvorbis myself. I'll tell you exactly how I do it and what the results are (what it links against). – Cauterite Aug 19 '16 at 22:52
  • There is something strange going on, I think those DLL's with the long names are ones that Windows system DLL's forward calls to when you link to kernel32.dll and friends. The problem is probably elsewhere, you shouldn't have to care about those files. – torhu Aug 19 '16 at 22:53
  • @Cauterite thanks, I didn't really expect something like this to happen, derelict always worked perfectly for me. – jython234 Aug 19 '16 at 23:03
  • @torhu Yeah, I think the problem lies with my build. – jython234 Aug 19 '16 at 23:03
  • @jython234 my visual studio installation has apparently expired, and all my attempts to build it with mingw ended in failure, so i won't be building this myself any time soon. maybe try and find a binary on the internet somewhere you can examine. – Cauterite Aug 19 '16 at 23:51
  • Make sure the dlls and the application are both 32 bit or both 64 bit. Perhaps there is a mismatch at work here. – Adam D. Ruppe Aug 21 '16 at 03:27
  • @AdamD.Ruppe they are both 32 bit. If there is a mismatch the error message would be "is not a valid win32 application" – jython234 Aug 21 '16 at 16:50

0 Answers0