[postgis-users] Running PostGIS from Eclipse

Ruby Tahboub ruby.tahboub at gmail.com
Sat Nov 7 10:16:07 PST 2015


Hi Sylvain,

Thanks for taking time to look into the issue. For a purely different
purpose, I uninstalled both of Postgres and PostGIS, did *make distclean
maintainer-clean* in Postgres, then installed Postgres/PostGIS and Eclipse
was able to figure out the configurations without adding flags!

For reference: I run postgresql-9.4.4 and postgis-2.2.0dev

Best,
Ruby

On Fri, Nov 6, 2015 at 7:24 PM, Sylvain Racine <sracine at igreffe.net> wrote:

> Hi Ruby,
>
> I programmed this afternoon a postGIS query test in C++ with Eclipse. I
> encountered some issues with the compiler and the linker in order to add
> libpq library to my project. If it is yours, please refers to this page:
> http://www.postgresql.org/docs/9.1/static/libpq-build.html
>
> I had to add three flags to Eclipse Mars 1 release 4.5.1 to get a perfect
> compilation. One is located in Project/Properties/C/C++ Build/Settings/GCC
> C++ Compiler/Miscellaneous/Other flags. I added '-c
> -I/usr/include/postgresql ' where /usr/include/postgresql is path returned
> by typing in a shell pg_config --includedir. The other one is located in
> Project/Properties/C/C++ Build/Settings/GCC C++ Linker/Libraries/Library
> search path. I added '/usr/lib/x86_64-linux-gnu' where this path is
> returned by typing in a shell pg_config --libdir. The last one is located
> in Project/Properties/C/C++ Build/Settings/GCC C++
> Linker/Miscellaneous/Other object . I added '-lpq'.
>
> After that, I programmed a parametric query with both non-spatial and
> spatial fields. Notice that with libpq library, there are two modes to
> return result: binary and text modes. I chose text mode. Everything worked
> fine without any error message.
>
> I don't know which language that you program in Eclipse.
>
> Hope that this hint will help you
>
> Regards
>
> Sylvain Racine
>
>
> ----------------original message-----------------
> De: "Ruby Tahboub" ruby.tahboub at gmail.com
> A: "PostGIS Users Discussion"
> Date: Thu, 5 Nov 2015 17:33:02 -0500
> -------------------------------------------------
>
>
> > I can run Postgres/ PostGIS from command line. No, I'm not using
> plugins, I
> > use eclipse to debug the backend code, it works for Postgresql queries
> but
> > it gives error for anything spatial. I suspect it's an eclipse
> > configuration.
> >
> > On Thu, Nov 5, 2015 at 4:41 PM, Sylvain Racine sracine at igreffe.net
> wrote:
> >
> >> Hi Ruby,
> >>
> >> Do you talk about compiling PostGIS in C++ with Eclipse or to access
> >> PostgreSQL DB with a SQL plugin in Eclipse? If yes, please indicate the
> >> name of your plugin.
> >>
> >> Regards
> >>
> >> Sylvain Racine
> >>
> >>
> >> ----------------original message-----------------
> >> De: "Ruby Tahboub" ruby.tahboub at gmail.com
> >> A: postgis-users at lists.osgeo.org
> >> Date: Thu, 5 Nov 2015 15:15:31 -0500
> >> -------------------------------------------------
> >>
> >>
> >> > Dear All,
> >> >
> >> > I need help with configuring PostGIS to run from Eclipse. I already
> have
> >> > Postgres/PostGIS installed, and I can run Postgres from Eclipse.
> >> >
> >> > When I type a query with a spatial predicate, I get the following
> error
> >> > from parser:
> >> >
> >> > ERROR: could not access file "$libdir/postgis-2.2": No such file or
> >> > directory
> >> >
> >> > Thanks!
> >> >
> >> > Ruby
> >> >
> >>
> >> __________________________________________________
> >> > _______________________________________________
> >> > postgis-users mailing list
> >> > postgis-users at lists.osgeo.org
> >> > http://lists.osgeo.org/mailman/listinfo/postgis-users
> >>
> >> --
> >>
> >>
> >> _______________________________________________
> >> postgis-users mailing list
> >> postgis-users at lists.osgeo.org
> >> http://lists.osgeo.org/mailman/listinfo/postgis-users
> >
>
> __________________________________________________
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/postgis-users
>
> --
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20151107/ceb81c0c/attachment.html>


More information about the postgis-users mailing list