using dll from another object

Hi

I wanted to use a dll from another project. However this project is external to the visual studio solution that I am currently working on.  It has however been compiled on the same machine.

can i just throw the dll in the executable directory and start using it?

What's the difference between building it/not building it (conceptually)?  I am afraid I do not understand symbols very well.  Would different builds give different symbols for the same functions?

"@jkr  if you decide to use the DLL from the other project: Open the project in Visual Studio and build it. This will create the DLL and a .lib file of the same name. Add that .lib file (the so called "import library") to your project (either by right clicking on your project in the "Solution" tree view or your project's properties under "Linker|Additional libraries" and copy the DLL to your executable's directory to use it and rebuild your project as well."
LuckyLucksAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sarabandeCommented:
However this project is external to the visual studio solution that I am currently working on.  

the external dll has at least 3 components:

1. a header file which you can include such that calls to the library compile
2. a dll file which was used at runtime and need to be avilable either by putting into same folder as your own executable, or put path to PATH environment, or put dll into system32 (or SysWow64) folder.
3. a static library which has compiled wrapper functions which call into the dll.

you simply have to add the static library to linker input modules and the unresolved externals are resolved.

if the dll could not found at runtime, your program would not start but complain missing dll by error code 126.

Sara
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual C++.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.