?
Solved

Static Library

Posted on 2002-04-05
6
Medium Priority
?
195 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 3

Accepted Solution

by:
Crius earned 100 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 100 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

764 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