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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:48:21+00:00 2026-06-16T05:48:21+00:00

When trying to compile with boost, everything goes right with Windows, but when I

  • 0

When trying to compile with boost, everything goes right with Windows, but when I try to compile with Linux, it seems that the configuration given with SET command are not take in account by FindBoost.

When doing the following,

set(Boost_USE_STATIC_LIBS        OFF)
set(Boost_USE_MULTITHREADED      OFF)

find_package(Boost COMPONENTS system REQUIRED)
if (Boost_FOUND)
MESSAGE(${Boost_SYSTEM_LIBRARY})
endif ()

the output is /usr/lib/libboost_system-mt.a which seems to be the static and multithreaded version off the library. What am I doing wrong?

  • 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-16T05:48:22+00:00Added an answer on June 16, 2026 at 5:48 am

    If you look at FindBoost.cmake specifying Boost_USE_STATIC_LIBS as OFF uses the default suffix values for searching (CMAKE_FIND_LIBRARY_SUFFIXES) as opposed to overriding them. On my linux machine

    MESSAGE(${CMAKE_FIND_LIBRARY_SUFFIXES})
    

    returns

    .so.a

    So

    set(Boost_USE_STATIC_LIBS        OFF)
    

    provides a hint that results in .so files getting preference over .a but will include them if no matching .so is found. That being the case, the problem is that you most likely do not have the shared objects installed or they are installed somewhere FindBoost.cmake isn’t looking. To resolve this re-run cmake with

    cmake -DBoost_DEBUG=ON 
    

    and look at the output to see where cmake is looking for the boost libraries and then check those locations to see if the .so files actually exist. If they exist make sure they are named in a way that will match the hints you set, e.g. libboost_system-mt.so won’t match because you specified that multithreaded should be off.

    With regard to multithreading, with linux distros the libs without “-mt” are sometimes just symlinks to the libs with “-mt” so if that’s the case setting Boost_USE_MULTITHREADED to OFF will result in linking the multithreaded libraries.

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

Sidebar

Related Questions

I'm trying to compile unit test (boost) on Linux but compiler thows an error.
I am trying to compile boost under iOS, but every time I try to
I am trying to compile a code that uses Boost's zlib wrappers. However, no
I am trying to compile Flusspferd on Windows using MSVC, but it fails due
hi am trying to compile a simple program in boost library but i keep
I was trying to compile some code that uses Boost (1.49), with Clang(& libc++)
I'm trying to compile a program on Ubuntu 11.10 that uses the Boost libraries.
I'm trying to compile some software I've been writing in Linux that uses some
I'm trying to compile this example But that one header isn't enough and I've
I am trying to compile Boost 1.47 for x86 Windows CE using Visual Studio

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.