Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link a dll to a lib 1

Status
Not open for further replies.

Iverson3

Programmer
Aug 6, 2004
10
CA
HI,

My question is just what's the steps need to be taken to link a dll file to a lib file for compliation.

I can find some instructions on the web for linking a dll to an exe, but not for a dll to a lib file.

Can anyone help on this?

Thanks
 
DLL : Linking is done during execution.

LIB = Library linked during compilation (or the linking phase of the compilation rather)

So, naturally you never really link a DLL to a LIB.

However, the LIB can of course be linked into an EXE and that EXE can link to a DLL.

You access DLL stuff from a LIB the same way you access them from any other code.

/Per

"It was a work of art, flawless, sublime. A triumph equaled only by its monumental failure."
 
Hi PerFnurt,

Thanks for the reply. However, I just would like to clarify the following pts.

Problem: In the lib project, I need to create object of classes, which are declared in another dll file.

so i guess a possible solution might be follow:
1. I include all the necessary header files from that dll project in the current lib file. Thus, the compiler could compile the lib file.

2. Then I do the "actual" link procedure to the dll in the exe file, where the lib file is used.

will this actually solve the problem of "linking dll to lib" ?


Thanks
 
Yes, that is the way to do it.

/Per

"It was a work of art, flawless, sublime. A triumph equaled only by its monumental failure."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top