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

  • Home
  • SEARCH
  • 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 7784663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:07:51+00:00 2026-06-01T20:07:51+00:00

I have to give a demo on a machine which contains an old version

  • 0

I have to give a demo on a machine which contains an old version of the C++ boost library. Specifically I need boost::thread, in which I am using the lock member function of the mutex class. Unfortunately the old version (1.33.1) does not contain this method.

I don’t have root access on the target machine, and I can’t uninstall the previous version of boost. My solution was to pre-compile the updated library on the target machine and just link to the newer version of the library.

The library-compiling part went great, everything went off without a hitch, but when I tried to compile it still indicated that it was using the old version of boost. I did a bit of looking around (g++ noob here) and found out that you can manually specify a location to look for headers and libraries first using the -L and -I flags. I tried to use these with relative paths (since I don’t know the directory from which the demo will be executed but I do know the relative path to my new boost libraries) and I came up with this:

-bash-3.2$ g++ -I./include -L./lib main.cpp -lthread
/usr/bin/ld: cannot find -lthread
collect2: ld returned 1 exit status

I’ve been trying all kinds of stuff, such as specifying a path deeper into the include/library directories, but with no luck, and I feel like I’m at a dead end. Any ideas?
FYI, I’m looking to use boost 1.49.0.

  • 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-01T20:07:52+00:00Added an answer on June 1, 2026 at 8:07 pm

    Try:

    g++ -I./include -L./lib main.cpp -lboost_thread
    

    The name of the library you need to specify for -l is derived from the .so file: leave off the beginning lib and the .so (e.g. libboost_thread.so -> -lboost_thread)

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

Sidebar

Related Questions

I have a listbox in which i have to give minimum 2 files for
I have web-service which give list of property at a particular area My problem
i am creating a demo application using spring mvc 3.0.I have to apply the
See this demo from Filament Group using their Progressive Enhancement enhance.js library Modifying to
If anybody have a Page Curl Effect example Demo so please give me link
I have a Java application in which user can give any executable file (.exe)
I have a div which move from up to bottom before bounce, i need
I have create a demo project in which i have add button. On button
I have a list on my website. I'm using jQuery's sortable tutorial to give
I have a site which houses many various directories (such as admins, members, demo

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.