newbie with dlls

Started by
2 comments, last by trager 20 years, 3 months ago
I know this isn't an opengl question but is there a way to include a dll into a compilation so the dll does not need to be supplied with the executable? Should perhaps mention Im in windows XP using visual c++ .net. [edited by - trager on January 12, 2004 8:02:53 AM]
Advertisement
If by that, you mean "I want to use functions from this library, but I don''t want to include the .dll file with the .exe", then I don''t think there''s a way to do that. What you need is statically linked functions from a standard .lib file so the code is actually linked as part of the .exe. Standard dll files don''t do that.

You could create a new project and compile it to a .lib file, write the header, then just link it. I''ve never done that specifically (I''m rather fond of dlls ) but I don''t imagine it''s too hard. Do realize that it''ll make the .exe larger, but I suppose that''s what you want -- a complete package without extra files.

Did that help?
I''m not even sure including the .dlls in the exe will help I want to reduce the overage size of the package.

At the moment the exe is 70k but is accompanied with 700k of .dll and I bet I''m only using 10% of the functions in the dll files.

So just curious if there is any sure fire way of doing this
Well, if this .dll is something you made, you could compile a smaller .dll with less functions? Also, if you did indeed compile the .dll yourself, make sure it''s not in debug mode, that adds a ton of extra file size.

If it''s some .dll you got from somewhere else, I''m not sure what to say. It may be possible to extract function object info or something, but I wouldn''t really know how to do that without hacking apart the PE format.

This topic is closed to new replies.

Advertisement