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 7730941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:21:20+00:00 2026-06-01T06:21:20+00:00

I have a library project which includes a object (.o) file. I have the

  • 0

I have a library project which includes a object (.o) file. I have the following post build command to make sure the file is included in the build:

ar -r libProject.a AdHocObject.o

However, that means I have to manually copy my AdHocObject.o file in Debug and Release, and I can never clean the project, or I need to start over and copy AdHocObject.o in Debug and Release.

This becomes even more a hassle when I have a second project which uses the library (as an Include) and rebuilds it, making sure AdHocObject.o is erased first.

I’m a bit lost here. I’m thinking there could be various ways, but I can’t find them. I could:

  • Make the second project not rebuild the library, but I don’t know how;
  • Make the library keep AdHocObject.o in Debug and Release, but I don’t know how;
  • Add a pre-build command to copy AdHocObject.o to the output folder (Debug or Release), but… you guessed it.

Are any of these actions possible, and if more than one, what is the recommended approach?

  • 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-06-01T06:21:21+00:00Added an answer on June 1, 2026 at 6:21 am

    I got it, I just needed to point to the right place, put the o file with the sources and adjust the post build command thus:

    ar -r libProject.a ..\AdHocObject.o
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a Flex Library project - a .swc file - which is
I have a main project, which includes a nested library project which produces a
I have a Netbeans project with a library defined which includes several JARs. These
I have a C# project which includes one exe and 11 library files. The
I have a Java project which includes the Xerces library. When I process the
I have a class library project which contains some content files configured with the
I have a project which uses a large library residing in its own repository.
I have composite project which contains: C++ library for Linux/Windows, C++/CLI library based on
I am creating a Control Library project. I have some Cursor files which i
I have a class, which is part of a code library project that was

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.