Hi,

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" : 
              <include>"D:\\Development\\openmpi-1.4.3\\installed\\include"
              <library-path>"D:\\Development\\openmpi-1.4.3\\installed\\lib"
              <find-static-library>libmpid
              <find-static-library>libopen-pald
              <find-static-library>libopen-rted
              <find-static-library>libmpi_cxxd ;
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 symbol boost::detail::bfs_helper().

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?

Thanks,
Tao Yu
http://about.me/Tao_Yu



2011/9/9 余韬 <yyuuttaaoo@gmail.com>
Hi,

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 VS2008.
The additional dependency set for the project is "libboost_mpi-vc90-mt-gd.lib libboost_serialization-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 significantly:
http://terboven.wordpress.com/2008/09/09/building-and-using-boostmpi-on-windows-hpc-server-2008/
http://lists.boost.org/boost-users/2009/11/54042.php

However, while compiling D:\Development\boost_1_46_1\libs\graph_parallel\example\breadth_first_search.cpp 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?

Thanks,
Tao Yu
http://about.me/Tao_Yu