DLL Linking Question

Started by
2 comments, last by dave 15 years, 5 months ago
It didn't take me long to link a DLL into an EXE using a DEF file. In fact it was pretty trivial. One thing that i am thinking about testing is arbitrary pieces of functionality in different DLLs. Keeping this nice and simple for now i have a DLL (called DLLA) with an Increment() function that takes an integer reference, it increments the integer when called. I also have a DLL (called DLLB) that has a Increment100Times() function that takes an integer reference and calls Increment in the first DLL 100 times passing the reference in. Now first of all i fail to see how you resolve the dependancy of DLLB on DLLA. DLLA builds fine, but ofcourse DLLB cannot resolve the function Increment(). I can't see how i link it in the project settings and i don't think i can link using LoadLibrary() within DLLB because there is no code running at compile time. So any ideas on how i do this, if at all? Google only turns up articles on linking DLLs into EXEs.
Advertisement
You link against DLLs in DLLs the exact same way that you do from EXEs.
I think the problem was that the compiler wasn't outputting a LIB file as well as the DLL. So i didn't have anything to link in.
Yep, got it working. Was as i suspected.

Ta.

This topic is closed to new replies.

Advertisement