[pgrouting-dev] Regarding the generation of .so file for a postgresql function

Sankepally Rohith Reddy rohith.reddy at research.iiit.ac.in
Mon Oct 26 07:12:19 PDT 2015


Hello Dave,
    Sorry,I forgot to mention the details.

Machine:- Lenovo G510
Operating system:- Linux (Ubuntu 14.04)
gcc and g++ version:- 4.8.4(both)

Thanks in advance.

----- Original Message -----
From: "dave potts" <dave.potts at pinan.co.uk>
To: "pgrouting-dev" <pgrouting-dev at lists.osgeo.org>
Sent: Monday, October 26, 2015 7:15:28 PM
Subject: Re: [pgrouting-dev] Regarding the generation of .so file for a postgresql function

Since this is a matter to do with the operating system, it might help if you stated what machine you where using, what operating systems , which version the compile your using etc.

D..


October 25 2015 7:37 AM, "Sankepally Rohith Reddy" <rohith.reddy at research.iiit.ac.in> wrote:
> Hello there,
> 
> I am working on one of my projects which requires the implementation of a function/query which uses
> data from a postgresql database. To do so I need to generate a "my_function.so" from
> "my_function.c",which uses cpp functions.I am facing a problem in linking "my_function.c" with the
> cpp files(where the cpp functions are defined) and generate a "my_function.so" which is used to
> create a postgresql function.
> 
> "my_cpp_header.h":-
> 
> #ifndef DIJKSTRA_FUNCTION_H_
> #define DIJKSTRA_FUNCTION_H_
> 
> #ifdef __cplusplus
> extern "C" {
> #endif
> 
> int compute_dijkstra(int source,int target,Edge *edges,int num_vertices,int num_edges,Edge **path);
> 
> #ifdef __cplusplus
> }
> #endif
> 
> #endif
> 
> "my_cpp_function.cpp":-
> 
> #include "my_cpp_header.h"
> 
> int compute_dijkstra(int source,int target,Edge *edges,int num_vertices,int num_edges,Edge **path)
> {
> definition of the function(in cpp)
> }
> 
> I need to generate "my_function.so" from "my_function.c" which uses the above function.
> 
> Please help me solving this.
> 
> Thanks in advance.
> 
> _______________________________________________
> pgrouting-dev mailing list
> pgrouting-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
_______________________________________________
pgrouting-dev mailing list
pgrouting-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-dev


More information about the pgrouting-dev mailing list