Using third Party Supplied liabrary in Borland C++ Builder 1 or higher

I received a small .LIB file from a friend by email. This .lib file is also accompanied with a .dll file.

The read me file just stares use the supplied lib file to use the dll.

How do I merge the .lib file in my main library?


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.

U cannot merge it use quick view (or any other similar tool) to see what what it contains U can ask UR friend back also for the functionality
use LoadLibrary to load the dll use its functions
this is dynamic binding U can staticall link to dll by specifying name in Project setting Link tab

Hope this helps
nils pipenbrinckCommented:
it depends on your compiler..

one option is, that you link the .lib file to your own library.. that might work (it depends on the linker).

another option you have is to split the .lib into it's object files.. since it's a dll import library there will be only one .obj file in the lib.

if you use watcom c++ (noone does these days.. only me I think) you can do this with the command wlib -x blah.lib.

with vc you can do it with lib and the /EXTRACT option.

When you have the C++ header files .. and you wish to statically link .. ensure you find out from you friend how the lib was compiled (e.g. in the code generation what run-time library) is begin used

I would follow what inpras suggested ...

Get the header file from you mate
Declare the dynamic function calls .. that is quiet easy when you have the original functions (i.e. there is a nack to it)
Use LoadLibrary

The second method is preferable as you avoid link problems and compiler dependancys

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

From novice to tech pro — start learning today.