Solved

Static Library

Posted on 2002-04-05
6
191 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
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.

772 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