Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to create one static library that includes other libs?

Posted on 2009-03-30
3
Medium Priority
?
518 Views
Last Modified: 2013-12-14
I am making a static library A.LIB, which uses a function from another static library B.LIB.

How can I build library A.LIB so that when I use it I do not need to have B.LIB?
I am using Visual studio 2005

Thanks
0
Comment
Question by:romanm
  • 2
3 Comments
 
LVL 49

Accepted Solution

by:
DanRollins earned 1500 total points
ID: 24023179
You could extract OBJ files from B.LIB and them to A.LIB  Of course, you would also need all of the functions that were used in the extracted OBJ...
   LIB Reference
   http://msdn.microsoft.com/en-us/library/7ykb2k5f(VS.71).aspx
0
 
LVL 3

Author Closing Comment

by:romanm
ID: 31564506
True, that is one way, and in a simple case easy to do.
However for the MS Visual Studio, in the Properties -> Librarian, set "link library dependencies" to "yes" and that will do all the hard work for you.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 24024407
True... Using Properties -> Librarian should do the heavy lifting.  
I'm most familar with command-line tools and VS 6, so I missed that possibility.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses

783 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