Alex Rivera | Logout

Statically linking a DLL in Windows

Asked 2009-09-29T05:22:26.283
12

Consider this situation:

I'm creating a DLL (let's call this dllA), which, in turn, calls functions in other DLLs (let's call these dllX, dllY and dllZ). If someone else wanted to use dllA, they'd need a copy of dllX, Y and Z as well.

Is there a way to build dllA such that the needed functions in dllX, Y and Z get linked into dllA? I don't know if this is the right terminology, but is this called "statically linking a DLL"?

I'm looking for a simple solution. I'd be happy with something crude that simply concatenates dllX, Y and Z and appends that to dllA somehow, if such a thing exists. But I have this bad feeling that there's no easy solution to this.

I'm on Windows, using VS.

Thanks!

Edit
Report

1 Answer

2

I don't believe you can. I haven't heard of it being done. If you have build access to your other DLLs then you can build them as static libraries and that will work as you want but there's a reason why they're called dynamic link libraries.

EDIT: Just found this thread.

answered 2009-09-29T05:27:00.257

Your Answer