Reputation: 25551
I followed the MSDN walkthrough on creating and using a DLL in Visual C++ Studio, but it requires the user to add the DLL project to the same solution as the project they're working on.
Is there a simple way to include a DLL? Ideally, I'd like to just distribute my .dll
(and the .lib
, I suppose) to my friends so they can use it in their own projects.
I realize there are other walkthroughs out there (some of them on SO), but they all require editing the PATH environment variable, etc. Is that really the simplest way?
Upvotes: 1
Views: 196
Reputation: 992707
At a minimum, you need to do the following:
.lib
file in the project.lib
file (library search path).dll
file available at runtime (easiest is to put it in the same directory as the .exe
)To distribute the compiled .dll
to your friends, you will need to include:
.h
file(s) for the compiler.lib
file for the linker.dll
file for runtimeUpvotes: 4