Sign in to follow this  
BloodLust666

dll linking

Recommended Posts

[disclaimer]
Keep in mind that I am posting this assuming that you are developing for Win32 platform.
[/disclaimer]

you have the actual source code for the project? If so then just make a project that creates a static library and add all the source / header files to it. The process for creating projects will differ depending on which IDE you use (look in the documentation for it)

If you already have a library then I am not sure if that will help you because chances are its the importlib that is just used for linking to the dll. I don't think static libs == importlibs because I'm pretty sure an importlib only contains information about the exported functions/classes for the dll.

Share this post


Link to post
Share on other sites
Quote:
Original post by EvilKnuckles666
all i'm trying to do is link a dll to my code. just like i am doing with my lib files:

#pragma comment(lib, filename)

would it just be the same thing with a dll:
// #pragma comment(dll, filename) ?


No, by definition of a DLL. In order to statically link it, you need to recompile a static library, which is easy to do.

Share this post


Link to post
Share on other sites
If you do that, the dll will still need to be present when you run the program.

You could compile the dll into the executable as a resource. You would then need to write it to a file somewhere before calling LoadLibrary on it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this