Solved

Static Library

Posted on 2002-04-05
6
190 Views
Last Modified: 2013-11-20
I have created a static library project.I have included two files one isheader and second is c++ file.

There is only one function.Please tell me how i can use library in my other project.

Please give all steps.
0
Comment
Question by:malik_mumtaz
  • 2
6 Comments
 
LVL 3

Accepted Solution

by:
Crius earned 25 total points
ID: 6921222
1) In your other project, go to project->settings, and under the link tab, type in your library name and location into the objects/library modules edit control.

2) Include the header file into any source in which you want to use the library function.
0
 
LVL 49

Assisted Solution

by:DanRollins
DanRollins earned 25 total points
ID: 6922122
or place this inside one of the source files of the other project:

#pragma comment(lib,"yourlibraryname.lib")

Also the .LIB file should be located where the linker will find it.  I'll explain if you ask.

-- Dan

0
 

Author Comment

by:malik_mumtaz
ID: 6923079
hello crius

i have done this and when i call a member function of the library "undefined function" comes.Please tellif there is next option.
0
 
LVL 3

Expert Comment

by:Crius
ID: 6925481
Include the header file into any source in which you want to use the library function.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
iSeries FTP Exit Program 8 124
Folder Comparison 12 53
notReplace  challenge 53 116
ASP.NET C# MessageBox.Show Showing a modal dialog box or form when the application ... 2 104
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now