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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:38:23+00:00 2026-05-17T06:38:23+00:00

I am trying to run a boost example but I am getting the following

  • 0

I am trying to run a boost example but I am getting the following error:

g++ bimap.cpp -o bimap
bimap.cpp:1:28: error: boost/config.hpp: No such file or directory
bimap.cpp:8:27: error: boost/bimap.hpp: No such file or directory
bimap.cpp: In function 'int main()':
bimap.cpp:27: error: 'boost' has not been declared
bimap.cpp:27: error: expected initializer before '<' token
bimap.cpp:28: error: 'results_bimap' has not been declared
bimap.cpp:28: error: expected initializer before 'position'
bimap.cpp:30: error: 'results_bimap' was not declared in this scope
bimap.cpp:30: error: expected `;' before 'results'
bimap.cpp:31: error: 'results' was not declared in this scope
bimap.cpp:31: error: 'position' was not declared in this scope

But my environment variables are set as follows:

BOOST_HOME /apps/rhel5/boost_1_39_0 
BOOST_INCLUDE -I/apps/rhel5/boost_1_39_0/include/boost-1_39/ 
LINK_BOOST -L/apps/rhel5/boost_1_39_0/lib -Xlinker -rpath -Xlinker /apps/rhel5/boost_1_39_0/lib 

Am I supposed to provide any extra options while compiling?

  • 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-17T06:38:24+00:00Added an answer on May 17, 2026 at 6:38 am

    You must provide the paths to boost files to g++ itself.

    Try this:

    g++ bimap.cpp -I/apps/rhel5/boost_1_39_0/include/boost-1_39/ -L/apps/rhel5/boost_1_39_0/lib -Xlinker -rpath -Xlinker /apps/rhel5/boost_1_39_0/lib -o bimap
    

    Or (solution by TokenMacGuy):

    g++ bimap.cc $BOOST_INCLUDE $LINK_BOOST
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to run blocking_udp_echo_server.cpp from Boost asio example on MacOSX 10.5. But
I am trying to run the getting started example: #include <boost/lambda/lambda.hpp> #include <iostream> #include
I am trying to run the following program using boost::thread. #include <boost/thread.hpp> #include <iostream>
Trying to run the following code in Qt Creator on Win7 64bit. #include <boost/date_time/posix_time/posix_time.hpp>
I'm trying to compile and run the following example on Ubuntu 10.10 http://www.boost.org/doc/libs/1_47_0/doc/html/boost_asio/example/http/server3/ but
When trying to run a junit test I get the following error - java.lang.ClassCastException:
I'm trying to run the SSL examples from boost::asio and I'm getting an Invalid
I am trying to compile the run_timer_example.cpp example in the boost distribution (1.47.0) and
I'm trying to run following code: some_sock.async_connect(...); // handle_connect() sets the 'condition' flag boost::asio::deadline_timer
I am trying to run the following PCL simple viewer example from http://pointclouds.org/documentation/tutorials/pcl_visualizer.php I

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.