hi Everybody

I want to know how in borland c++ to use the lib file

i have a .lib file present with the source code of that library

i want to use the lib file

I have just added the lib into the project through

Project->AddtoProject i did not get the class present in it

2nd thing i tried is to add all the files of the lib i got the class
but got some 10 errors

Pls give me some solution of some sample code that uses .lib file

10 Years
Discussion Span
Last Post by John A


.lib files are dynamically linked, so the code contained inside these files is usually minimal, compared to the DLL files that have to acompany the .lib files.

Usually when you get a .lib file, there's a header file (*.h) to go with it. You then add this to the top of your file:

#include <cool_new_library.h>

Replace < and > with quotes if the header file is in the local directory, of course.

As described in Borland's documentation, you may have to encapsulate the header inclusion with an extern c statement if you get "unresolved external symbol" errors:

extern "C" {
#include "cool_new_library.h"

This may also be of use to you:

Hope this helps

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.