<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
I am trying to add a function: 1-to-many dijkstra shortest path.<br>
Thus I downloaded the last git and added a folder named 1toNsp in
"extra", which contains tomanysp.h, tomanysp.c and
boost_wrapper_tomany.cpp.<br>
<br>
These files are highly inspired from the dijkstra.h, dijkstra.c and
boost_wrapper.cpp files that are in the "core" directory.<br>
-actually for now it's mainly a copy/paste of them-<br>
<br>
I also created a .sql in extra/1toNsp/sql to define the function
onetomany_dijkstra_shortest_path(text, int, int array, boolean
,boolean).<br>
I checked if this function exists by returning the distance between
source and the first target only, using boost_dijkstra; this works
well \o/.<br>
<br>
Now I want the (static int compute_tomany_shortest_path(char* sql,
int start_vertex, <br>
int *end_vertices, int nb_targets,
bool directed, <br>
bool has_reverse_cost, <br>
path_element_t **path, int
*path_count)) function to call a function defined in
boost_dijkstra_tomany.cpp (named boost_dijkstra_tomany(...)).<br>
<br>
Problem is that when I call <br>
routing=> SELECT * FROM onetomany_dijkstra_sp('SELECT gid AS
id, source::int4,<br>
target::int4, length::double precision AS
cost,length::double precision<br>
AS reverse_cost FROM ways', 3, '{7,18,179}', true, true);<br>
I get<br>
ERROR: could not load library
"/usr/lib/postgresql/9.1/lib/librouting_tomanysp.so":
/usr/lib/postgresql/9.1/lib/librouting_tomanysp.so: undefined
symbol: boost_dijkstra_tomany<br>
<br>
This function (int boost_dijkstra_tomany(......)) is declared in
tomanysp.h and called from tomanysp.c; while it is defined in
boost_wrapper_tomany.cpp (which #includes "tomanysp.h"); once again
it looks the same as what is done with dijkstra.h, dijkstra.c and
boost_wrapper.cpp.<br>
<br>
my /extra/1toNsp/src/CMakeLists.txt is :<br>
SET(LIBRARY_OUTPUT_PATH ../../../lib/)<b><br>
</b> ADD_LIBRARY(routing_tomany SHARED boost_wrapper_tomany.cpp
tomanysp.c tomanysp.h)<br>
INSTALL(TARGETS routing_tomany DESTINATION
${LIBRARY_INSTALL_PATH})<b><br>
<br>
</b>Could someone tell me what I am missing?<br>
<br>
--------------<br>
Using postgresql 9.1 with ubuntu 11.10.
</body>
</html>