Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6730085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:21:58+00:00 2026-05-26T10:21:58+00:00

I have C++ source code (xyz.cpp) for static library called libxyz.lib, in this xyz.cpp

  • 0

I have C++ source code (xyz.cpp) for static library called libxyz.lib, in this xyz.cpp I call some functions p, q, r which are part of other static library called libabc.lib.

Now when I compile code (xyz.cpp) i want that object code for libabc.lib gets included inside (libxyz.lib)

Is this possible?
Or do I have to ship both libxyz.lib & libabc.lib to user who wants to use them ?
I am using Visual Studio C++ 2005

Thank you in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:21:59+00:00Added an answer on May 26, 2026 at 10:21 am

    AFAIK you can only achieve that by turning xyz into a DLL, but in that case you would still be shipping xyz.dll + a xyz.lib file + required headers. When you build a static lib, other static libraries are not linked in: the .lib file only contains the object code of xyz functions. See http://msdn.microsoft.com/en-us/library/ms235627(v=vs.80).aspx

    If building from the command line, you must build the program in two steps. First, compile the code using Cl.exe with the /c compiler option (cl /c /EHsc MathFuncsLib.cpp). This will create an object file named MathFuncsLib.obj. For more information, see /c (Compile Without Linking). Second, link the code using the Library Manager Lib.exe (lib MathFuncsLib.obj). This will create the static library MathFuncsLib.lib. For more information on the Library Manager, see LIB Reference.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a source code of a library which has a lot of strange
I have some PHP source code that I'm hosting with hosting company XYZ. I'm
I have some source code to get the file name of an url for
I have this source code from 2001 that I would like to compile. It
I have an installer for which I don't have any source code. I need
I am debugging a third-party DLL for which I don't have the source code.
I have html page source code with img tags like <p>xyz </p>< img .......
I have developed some reusable android component which is basically a class . This
I have a source code of an OpenSource project which I get from SVN.
I have some source code and I would like to auto generate class diagrams

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.