Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using external library

Status
Not open for further replies.

stemy

Programmer
Aug 25, 2001
39
IL
Hi

I want to use an external function library in my application(Pthreads for instance). I downloaded the .h .lib and .dll files. Now, what do I need to do to configure my project to use the library ? do I need to tranfer the files somewhere or just conigure vc ?
thanx.
 
include the .h file at the top of any source file that needs it (or include it in stdafx.h to include for every source file)

Go to project settings, choose the Link tab, and under "Object/Library modules" enter the name of the Lib file (including .lib extension). Note that the directory which contains the lib file must be listed under Tools:Options, Directories tab, under Directories for include files.

And for the DLL file (which you will have to distribute with your application), put it in a place where Windows will find it... usually either in your program's directory, or in the \WINNT\SYSTEM directory.

Usually if the DLL is shared among only the programs in your product, you place it in your program's directory. (Example: Winamp plugins, for which Winamp will probably be the only program that uses them.)

If it is likely that this library might be shared among several different applications (for example, the PNG graphics library or the OGG Vorbis audio library)

I REALLY hope that helps.
Will
 
Oops, I forgot this at the end of my last post:


or the OGG Vorbis audio library) place it in the \WINNT\SYSTEM directory (or \WINDOWS\SYSTEM for Windows 9x/ME). Of course you will use SHGetSpecialFolderPath to retrieve that path.

I REALLY hope that helps.
Will
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top