After my last project, I passed the finished job onto a friend to test.

She reported that when she tried to run it, she was pesented with an error that some dll files were missing (Im sorry I cannot remember them now), I searched while on the phone with her and they, were part of an MS redistributible pack.

Are there any procedures to take when building a dll to include the missing libraries in it, so they dont need to be added later?

Recommended Answers

All 2 Replies

When you "release" code and executable files, you should have a README explaining what the dependencies are and you should either include the dependencies in the relase or explain in the README what needs to be obtained in order to use your code/program. for example, if you write a DLL and it needs a library called libcurl.a, you should point that out and either provide it or tell people where they can get it. Similarly, if your dll requires another dll or text file or whatever in order to run, stick it in the README and provide it or explain how to get it.

It's also not uncommon to have an installer and as part of that installer, there may be a dependency scan that scans the system for the files/setting required to use whatever you are releasing and give appropriate error messages. In addition, it's always useful to do a check in the DLL and report a useful error message when something's missing. Document, document, document! If the requirements aren't obvious, it's your job to point them out explicitly.

The best way to do all of this will vary considerably from case to case. If the dependency is something like they need a certain release of, say, Java or Flash, Java and Flash will usually provide a fairly easy way to check. Use it. If you are providing the missing dll or whatever yourself, that's a different animal and it will vary considerably as to whether you're dealing with a dynamic library or a static library or a path setting or a version number or a permissions issue or whatever.

If it's just you releasing it to your friend, you may not want to go to all that trouble.

commented: Good answer +5

Thanks for that, I was misinformed that dependant functions from these libraries could be imported to my.dll.

Its nothing commercial, or anything I'm about to distibute to a significant amount of people, just a custom project.

I'm a little unfamiliar with protocol though, does anyone know if I am free to include these files in my package, with an option for user to have them intalled, or if I need some sort of permission from MS?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.