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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a lib, but how to load it ?

Status
Not open for further replies.

ZimZangZoom

Programmer
Dec 17, 2004
26
0
0
Hello,
I am new to C, but have some experience in other languages like C.

I need a bit of help loading a library i have found written in C

Included in the download of this library are some .exe .dll and .h files.

How do i go about using the functions this library provides using Visual Studio ?

I tried "Adding Reference" in Visual Studio but i get an error.

I am really new. so if someone could find the time to help out that would be great!

Thanks,

Andrew
 
Assuming you are using VS6. Right click on the project, select settings. Click on the link tab. On the link tab, clikc on the drop down and select Input. Inset the lib at the start of the list of libs, click OK and relink.

If you are using VS2002, 2003 or 2005, Right click on the project and select properties. The rest is the same as above.
 
As usually with third-party libraries, modify your Project Settings. With Shapelib Win binary distribution you need shapelib.h (to compile library API calls), shapelib.lib (modules to redirect calls to dll) and shapelib.dll (the library modules). All exe files in the distribution are utilities (tools, download and read pdf documentation from the Shapelib site).

In Project Setting add path to shapelib.h in C/C++|Preprocessor Additional include directories text box, add full path to shapelib.lib file in Link Object/Library modules text box. Place shapelib.dll in one of path directories (or modify path environment var in your system to add shapelib.dll file to the path). That's all.
 
OMG.
Whatever happened to:

Get library, including header files, locate header file
in filesystem at the 'right place'(tm), insert header file
in source at the, 'right place'(tm), compile library,
and then do the time honored $cc $myprogram -o progname $libname. ????

Sorry for the flame but you get the idea.
It's just irritating to see people struggle with things
like this when it's pretty unnecessary.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top