Boost logo

Boost Users :

Subject: Re: [Boost-users] newbie: my program can't find boost libraries
From: sparsh mittal (sparsh0mittal_at_[hidden])
Date: 2012-03-31 18:07:16


Thanks a lot, all, for helping me out. Now my program finds the path
properly.

However, I find that on using gcc 4.6.0 it generates "internal compiler
error, seg-fault". Is there any conflict etc. in boost and gcc 4.6.0 or
some other issue. I can send preprocessed file or more info, if desired.

Thanks and Regards
Sparsh Mittal

On Sat, Mar 31, 2012 at 4:17 AM, Kraus Philipp
<philipp.kraus_at_[hidden]>wrote:

>
> Am 31.03.2012 um 02:16 schrieb Lars Viklund:
>
> > On Sat, Mar 31, 2012 at 02:10:41AM +0200, Philipp Kraus wrote:
> >> On 2012-03-31 00:09:59 +0200, sparsh mittal said:
> >>> In my RHEL linux (no root permission), my program does not find boost
> >>> installation and says:
> >>> *** Please install package libboost-filesystem to /home/myself/folder
> >>> *** Please install package libboost-system to /home/myself/folder
> >>>
> >>> I installed latest boost using these instructions.
> >>>
> >>> ./bootstrap.sh ----with-libraries=filesystem,system
> >>> --prefix=/home/myself/folder
> >>>
> >>>
> >>> ./bjam install
> >>>
> >>>
> >>> Can you tell, what is wrong I am doing and anything to add in include
> path etc.
> >>>
> >>> My paths:
> >>>
> >>> echo $LD_LIBRARY_PATH
> >>> /home/myself/folder/lib:/home/myself/ddrive/test/boost_1_49_0/stage/lib
> >>>
> >>> echo $CPLUS_INCLUDE_PATH
> >>> /home/myself/folder/include/
> >>>
> >>> My program has makefile:
> >>>
> >>> LD_LIBS += -lboost_filesystem -lboost_system (and others)
> >>
> >> LD_LIBRARY_PATH is the env variable for the linker, you must also set
> the
> >> LIBRARY_PATH for running a programm. A program searches the LIBRARY_PATH
> >> first for the libraries. The linker does not search the LIBRARY_PATH, it
> >> uses the
> >> LD_LIBRARY_PATH
> >
> > Not quite.
> >
> > The regular linker doesn't look anywhere indicated by an environment
> > variable. It just looks in the system locations and wherever specified
> > with a -L flag when linking.
> >
> > His error seems to be from some build system, not his compiled program.
> > He needs to provide parameters like "-L/home/myself/folder/lib" to it,
> > typically in the form of LDFLAGS or similarly named parameters.
> >
> > LD_LIBRARY_PATH is for the dynamic linker to resolve shared libraries at
> > runtime, it has no role at linking time.
>
> Your right, I have set in build toolset (Scons) both types LD_LIBRARY_PATH
> and LIBRARY_PATH
> to equal values and my Scons script should read the path values of the
> variables and set the -L
> parameter on the g++ calls. In my case I can add a new directory to the
> linker and run command
> if I set only one of the variables to the path.
>
> Phil
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net