1

I'd like to use LibSndFile in my project. It provides a set of dlls for x32 and x64 but I'd like to get rid of dlls. Is it possible to build .lib files from the source codes and then get rid of the dll?

I don't want .dlls because you have to copy them into the Windows folder for your program to work and I would prefer to have only one big file with everything in it (and yes I tried ILMerger or IlRepack, etc without success)

Joseph Stine
  • 1,022
  • 1
  • 12
  • 23
IonOne
  • 385
  • 4
  • 15
  • 1
    _you have to copy them in the Windows folder_ that's just not true. Refer to http://msdn.microsoft.com/en-us/library/ms682586(v=vs.85).aspx, desktop applications. It starts with "The directory from which the application loaded" in other words put the dll next to your exe and you're fine. – stijn Aug 20 '13 at 13:25
  • Thank for your answer. It's a dll not an exe (sorry i didn't mentioned that) and i tried to put the dll library next to the dll but it won't works – IonOne Aug 20 '13 at 13:34
  • I don't know how responsive the developers of the plugin host you're using are, but they should be using `LoadLibraryEx` with the `LOAD_WITH_ALTERED_SEARCH_PATH` flag when loading plugins, specifically to allow plugins to load their own dependencies from their own directory. Maybe you can file a bug with them. – Sebastian Redl Aug 20 '13 at 15:54

1 Answers1

0

You can read this thread: How to convert a dynamic dll to static lib?

And then you can try Enigma Virtual Box: http://enigmaprotector.com/en/aboutvb.html The last one allows you to package all your files (dlls and resources) into a single executable.

Community
  • 1
  • 1
Archie
  • 2,644
  • 21
  • 21
  • thank you for your answer. Enigma sounds great but i was unable to make the packed dll work (it says i am low on memory). also i tried DLL2LIB before with no luck either – IonOne Aug 20 '13 at 16:43