Solved

Static Library

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Tab names are off by one 5 54
viewing source code from eclipse 13 110
fix34  challenge 9 163
Sed question 2 120
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.

679 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