2

I have installed boost_1.58_0 on my loptop's home directory. After some processes I faced to this message:

The following directory should be added to compiler include paths:

/home/acerv3-571g/boost_1_58_0

The following directory should be added to linker library paths:

/home/acerv3-571g/boost_1_58_0/stage/lib

However for other boost versions I have seen some posts but unfortunately I am not able to use of them. Regarding to my low knowledge in ubuntu, I think they are not so straightforward and clear.

The bellow lines related to the comment

 # ~/.bashrc: executed by bash(1) for non-login shells.
 # see /usr/share/doc/bash/examples/startup-files (in the package    bash-doc)
# for examples

 # If not running interactively, don't do anything
 case $- in
 *i*) ;;
  *) return;;
esac

    # don't put duplicate lines or lines starting with space in the     history.
   # See bash(1) for more options
   HISTCONTROL=ignoreboth

 # append to the history file, don't overwrite it
  shopt -s histappend

  # for setting history length see HISTSIZE and HISTFILESIZE in    bash(1)
    HISTSIZE=1000
    HISTFILESIZE=2000

     # check the window size after each command and, if necessary,
      # update the values of LINES and COLUMNS.
    shopt -s checkwinsize

    # If set, the pattern "**" used in a pathname expansion context will
   # match all files and zero or more directories and subdirectories.
   #shopt -s globstar
9
  • What are you actually trying to build with boost, and how (make? cmake?) Fundamentally you will need to add directives like -I /home/acerv3-571g/boost_1_58_0 and -L /home/acerv3-571g/boost_1_58_0/stage/lib on the compiler/linker command lines, however the easiest way to do that will depend somewhat on the build environment you're using. Jul 29, 2015 at 8:23
  • @steeldriver, I had used (before I asked my question here) this line: env CPPFLAGS='-I/home/acerv3-571g/boost_1_58_0' LDFLAGS='-L/home/acerv3-571g/boost_1_58_0/stage/lib' ./configure but it did not help me Jul 29, 2015 at 11:17
  • Also, after using of Wayne_Yux answer, I checked in terminal with acerv3-571g@acerv3571g-Aspire-V3-571G:~$ dpkg -S /usr/include/boost/version.hpp , But I just had gotten : dpkg-query: no path found matching pattern /usr/include/boost/version.hpp ` Jul 29, 2015 at 11:23
  • dpkg won't know anything about software that you have installed manually. If CPPFLAGS and LDFLAGS dont' work, try running ./configure --help and looking for variables related specifically to the boost library such as --with-boost=. If you need further help then tell us what you're trying to build. Jul 29, 2015 at 12:02
  • I installed the boost_1_58 for building ALPS code, but the main problem happened with this message: from /home/acerv3-571g/Downloads/alps-2.2.b3-r7462-src-with-boost/boost/libs/mpi/src/broadcast.cpp:9: /home/acerv3-571g/Downloads/alps-2.2.b3-r7462-src-with-boost/boost/boost/mpi/config.hpp:20:17: fatal error: mpi.h: No such file or directory #include <mpi.h> ^ compilation terminated. Jul 29, 2015 at 12:10

1 Answer 1

1

you need the following commands:

export INCLUDE="/home/acerv3-571g/boost_1_58_0:$INCLUDE"
export LIBRARY_PATH="/home/acerv3-571g/boost_1_58_0/stage/lib:$LIBRARY_PATH"

you can execute them in a terminal to set these variables in the current terminal session. If you want to make them permanent, you have to add these lines to your .bashrc

2
  • Thank so much for your guidance, I went to home directory and use of ` ls -la ~/ | more` to see hiddens, After that I used of emacs to edit the .bashrc but As I uploud that in the main question, I do not know where I should add those line in the file?! Jul 29, 2015 at 8:03
  • you can just add them at the end of the file
    – Wayne_Yux
    Jul 29, 2015 at 8:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .