Greetings! My game is now operational (and totally dumb, haha) and I tried showing it to a few friends. The library I'm using is designed using the DirectX 9 SDK, and so I had to have a few friends update to DX9 to run it, but I was surprised when my friend with Windows Vista couldn't run it due to missing .dll's. So my question is this: is it possible(legal?) to include the required .dll's with my game code so that it can run on any windows platform, regardless of which version of DirectX they have? I know I'd need to be able to tell my program where to find the .dll's, but I'm not sure how to do this, and it's entirely possible that there's a better solution to this problem. Thanks for the help!
You need to check the license for each individual dll. I think for DirectX in particular, you are allowed to redistribute the entire package with installation files, all licenses etc, but not single files.
That's cool, how do I tell my program to check in a directory other than the default for the .dll though? I tried including one of the mssing .dll's with my program for a friend, and it still came up missing, even in the same folder as the .exe, so I suppose I have to instruct my program to look in a different location. Also: is there a way to statically link the .exe file so it isn't dependent on .dlls? I've done it once before with the Allegro library and Dev-C++ during my last attempt at game design(like a year ago), but now I'm using MSVC++ and the Dark GDK, and I'm not sure how to do it with these.
I think that windows is looking for dlls in the current working directory, and in directories listed in PATH.
If you want static linkage, it must be supported by the library. In some cases, you need a different version of the library, or you need to rebuild the library. In other cases, you can select static or dynamic linkage in the project configuration. You need to specify more details about the library and the environment/compiler.