Original Post
Hey everyone! Merry Christmas! Mr. Foster has written a great article on using plugins for your programs. It is here. However, there are some design concepts that I do not understand relating to dlls and lib files. When you use a .dll, you must link in the .lib - other wise the compiler cannot find the definitions of the functions used. You must also have a header file telling the compiler to "import" in those functions. When you link in the library - does it not add to the file size of the executable? I always thought when you link in .libs, it added some overhead - however, I noticed that it was not in my program from that article. To show this I copied the program's exe size before and after including the lib - 16.0 KB (16,384 bytes) - before 16.0 KB (16,384 bytes) - after Now I know there is another type of library file - the static that is compiled into the .exe, so you do not have to use a .dll. Was I just misinterpereting the way .dlls work - as in the .dlls contain all the info for the functions - and the .libs just refrence it, but do not add anything to it? Furthermore, graphics apis that use .dlls, such as SDL, OpenGL, and DirectX - you have to use the .dll and .lib, so if im not mistaken than, using them adds no overhead to a program size? If anyone can confirm this or straighten things out for me, it would be much appreciated. Thanks! - Drew [Edited by - Drew_Benton on May 25, 2005 9:40:20 PM]