Thursday, July 9, 2009

C++ how to use a c++ dll as a reference?

I made a dll. I added it as a reference, but now how do I work with it?


#include%26lt;myDLL%26gt; ?

C++ how to use a c++ dll as a reference?
References is a concept used in managed code (.Net Framework) and provides an easy way to combine the code from .dlls. In regular C++, this can be a lot trickier. A regular C++ DLL will export function definitions (using dllexport or whatever compiler symbol is expected) into a .lib file. You then tell the linker that you want to combine this .lib with your project so it knows how the code is supposed to work. You cannot add them to references to non-managed code, it won't work.





I assume you are referring to .Net references, if not disregard this answer.
Reply:No, you go to IDE's "linker" option menu and direct the dll's path.


No comments:

Post a Comment