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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:00:28+00:00 2026-05-15T00:00:28+00:00

In a cross-platform (Windows, FreeBSD) C++ project I’m working on, I am making use

  • 0

In a cross-platform (Windows, FreeBSD) C++ project I’m working on, I am making use of two external libraries, Protocol Buffers and ZeroMQ. In both projects, I am tracking the latest development branch, so these libraries are recompiled / replaced often.

For a development scenario, where is the best place to keep libprotobuf.{a,lib} and zeromq.{so,dll}? Should I have my build script copy them from their respective project directories into my local project’s directory (say MyProjectRoot/lib or MyProjectRoot/bin) before I build my project? This seems preferable to tossing things into /usr/local/lib, as I wouldn’t want to replace a system-wide stable version with the latest experimental one.

Cmake warns me whenever I specify a relative path for linking, so I would suspect copying is a better solution then relative linking? Is this the best approach?

Thanks for your help!

  • 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-15T00:00:28+00:00Added an answer on May 15, 2026 at 12:00 am

    I would suggest you don’t copy files around in the source tree, and definitely not into the system folder, instead go for a defined target location –

    • $BUILD_TARGET/bin – final binary destination (.exe/.so/.dll etc)
    • $BUILD_TARGET/obj – object file destination (.obj etc)
    • $BUILD_TARGET/lib – static library destination (.lib etc)

    You can further develop this using optimization/debug targets –

    DEBUG

    • $BUILD_TARGET/binD – final binary destination (.exe/.so/.dll etc)
    • $BUILD_TARGET/objD – object file destination (.obj etc)
    • $BUILD_TARGET/libD – static library destination (.lib etc)

    RELEASE (OPTIMIZED)

    • $BUILD_TARGET/binO – final binary destination (.exe/.so/.dll etc)
    • $BUILD_TARGET/objO – object file destination (.obj etc)
    • $BUILD_TARGET/libO – static library destination (.lib etc)

    The possibilities are endless, x86/x64 etc.

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

Sidebar

Related Questions

I'm just starting out on a cross-platform (Windows, Linux, OS X) C++ project, and
I'm writing some cross-platform code between Windows and Mac. If list::end() "returns an iterator
I'm writing cross platform C++ code (Windows, Mac). Is there a way to check
I have a cross platform program that runs on Windows, Linux and Macintosh. My
I'm developing cross-platform project that would support : Four C++ compilers - GCC, MSVC,
I have (in the past) written cross-platform (Windows/Unix) applications which, when started from the
I want to create a C++ cross-platform (Windows and MacOS X) application that sends
I'm looking for an open source, cross platform (Windows & Linux at least) command
I am writing a cross-platform C++ program for Windows and Unix. On the Window
I am using some cross platform stuff called nutcracker to go between Windows and

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.