properly implementing Dll's and libs in VC++
I want to get this straight. I know what DLL's are. I have done research on them. they are like executable except they can not be access directly. Their main purposes are to provide additional resources such as functions and variables for your application. What I do not understand is.
Do you have to include the h开发者_如何学编程eader for both libs and DLL's and is this the only thing required to use them. (I am pretty sure you have to but I want to get that clear)
in the link library dependencies, can you just include the folder to them. how does Visual studio search the folder to know which one's to pick up
Can both the dlls and libs be included in library dependencies. if not then where are they suppose to go in order for them to work.
There are two ways to use a DLL. You can either load the DLL's functions individually (with LoadLibrary and GetProcAddress), or you can include the DLL's associated LIB file in your project. If you include the LIB file, you will not need to explicitly load each function in the DLL; you will have access to all of them.
You will not need to add the DLL file to your VC++ project; only add the LIB file. However, you will need to make sure the DLL is either in the same folder as your executable or in a directory that is in your system path.
精彩评论