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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calling external dll 1

Status
Not open for further replies.

slowbob

Technical User
Dec 15, 2000
7
NL
Conceptual misunderstanding
I have always believed that .lib were pieces of code which could be included in my compiled code
While .dll were pieces of code that stayed external.
However my Code Warrior compiler won't link to a dll
unless the .lib file is available.
This line alone will not do the job.
"extern void WINAPI ReadProjectName(char * ProjectName);"
The name of the dll file is not even used.
Can anyone explain please this to me? *<|:)

'If its hard to write it should be hard to read'
 
ooops.. u missed the part that on windoz with a .dll file u need a _corresponding_ .lib file which contains the function addresses in the .dll file that it refers to!!.. :)
(sometime compile a dll and u would know that this .lib is very small but essential to use at compile time for linking programs!!)

the .lib above is different from .lib for static libraries which contain the entire funtions themselves..

remember ofcourse that this .lib is necessary only compiling and linking purposes, whereas with ur executable u only have to supply the .dll which shall be searched in the path directories.. (ofcourse u will normally put it in xxx\system\. directory.. )

-hth,
shail

--
There are three methods for writing code in which no bug can be found:
1) Make the code so straightforward that there are obviously no bugs.
2) Make the code so complicated that there are no obvious bugs.
3) Insist that any apparent bugs were really intentional features.

 
Thanks, I sure did miss that.
And of course nothing about this in link error help.
?Not enough letters in alphabet that someone could
give this another name like *.adr
'If its hard to write it should be hard to read'
 
hi,

this point has certainly confused me too.. why call it the with the same file extension? like when i was building both libs for my product... v had to give names for say crypt libraries with names like crypt.lib (static lib) and crypt_dll.lib + crypt.dll (dynamic lib pair)!!

bill... bill.... ny reasons?? ;-)

on seconds thoughts though these r only accepted norms ... u _can_ name them as u like and include appropriately with assigned extensions in ur development environment..

-afaik,
shail.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top