Skip to main content
gamedev.net
🔒 Locked

.DLLs

Started by Metal Typhoon 0 replies 200+ views
Original Post
Metal Typhoon
Metal Typhoon
can someone explain me how dll work ? what do i need them for ? will a game ever use a dll file? thz alot
Metal Typhoon
camcbri
camcbri
a dll is basically a little executable file that sits outside of your programs main executable. They allow many different programs access to all of the functions inside of it. Also, they make it really easy to make changes/updates to programs...

For example, if your physics engine was contained in a dll and you found out you had a bug, you could re-build the dll and just overwrite the old one.. No rebuilding the main exe or anything else (unless you change function prototypes, of course).

When you create the dll, you specify that you want to be able to call the functions in it from other programs by ''exporting'' them. Then, you either link the dll in explicitly to your other programs, or do it dynamically... I won''t say specifics on how. After that, you can use the functions just like they were declared in the executable that''s calling them.

As far as what you need to create them, just a compiler... If you have MS Visual C++ then it''s an option when you create a new project to make a DLL.

Oh, pretty much every game in existence uses them. By using DLL''s they can make their main executable as small as possible.

if i''m incorrect anywhere, someone please correct me.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.