Boost Users :
Subject: Re: [Boost-users] LINK Error while building PBGL example breadth_first_search.cpp
From: ä½é¬ (yyuuttaaoo_at_[hidden])
Date: 2011-09-12 13:40:55
I have fixed some linking errors:
First, I misunderstand what HPC Pack is. My boost was not built with Open
MPI then, it found HPC Pack 2008 SDK instead. So I have to add the following
lines to the user-config.jam.
# MPI configuration.
using mpi : "D:\\Development\\openmpi-1.4.3\\installed\\bin\\mpicc.exe" :
This works great as I rebuilt the library.
Second, I have successfully built another example
program dijkstra_shortest_paths.cpp. However, while building this one I
cannot get rid of the last linking error. That is the linker failed to find
Third, I had investigated into breadth_first_search.hpp under both
boost/graph and boost/graph/distributed. I found the declaration is in the
boost/graph/breath_first_search.hpp, but is defined in
boost/graph/distributed/breath_first_search.hpp. I had tried to include
either file and both file but the linking error persisted. I had tried to
copy the definition into the former and into the example cpp file, but it
turn out to be vain.
So, what is the problem? Is it because I am using cl.exe and link.exe
shipped with VS2008?
2011/9/9 ä½é¬ <yyuuttaaoo_at_[hidden]>
> I am trying to learn PBGL. I am using VS2008 on Win 7.
> I had built and installed open mpi 1.4.3, HPC Pack 2008 SDK, and Boost
> library 1.46.1 with "bjam --with-mpi --with-graph_parallel".
> I had set include and library directory for the above 3 libraries in
> The additional dependency set for the project is "libboost_*mpi*-vc90-mt-gd.lib
> libboost_wserialization-vc90-mt-gd.lib libboost_graph-vc90-mt-gd.lib
> libboost_*graph_parallel*-vc90-mt-gd.lib libboost_system-vc90-mt-gd.lib
> libmpi_cxxd.lib libmpid.lib libopen-pald.lib libopen-rted.lib msmpi.lib"
> Here are the major references I had referred which helped to reduce errors
> However, while compiling
> on my machine, I still got the following 4 link errors:
> Error 4 error LNK2019: unresolved external symbol "*private: struct
> ompi_datatype_t * __thiscall boost::mpi::detail::mpi_datatype_map::get(class
> type_info const *)*" breadth_first_search.obj
> Error 3 error LNK2019: unresolved external symbol "*private: void
> __thiscall boost::mpi::detail::mpi_datatype_map::set(class type_info const
> *,struct ompi_datatype_t *)*" breadth_first_search.obj
> Error 2 error LNK2019: unresolved external symbol "*public: __thiscall
> boost::mpi::communicator::operator struct ompi_communicator_t *(void)const
> * " breadth_first_search.obj
> Error 1 error LNK2019: unresolved external symbol "void __cdecl
> boost::detail::bfs_helper<class boost::adjacency_list<struct
> boost::vecS,struct boost::distributedS<class
> boost::graph::distributed::mpi_process_group,struct boost::vecS,struct
> boost::defaultS>......" breadth_first_search.obj
> Am I missing something here?
> Tao Yu
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