0

I'm trying to build PosgreSQL in Eclipse CDT Mars on Windows using the MinGW-64 gcc 5.3.0

I installed MSYS2 and used pacman to update all the software that came with it and install gcc etc.

I downloaded the PostgreSQL source code and tried to follow the docs but can't figure out where to download the dependencies? 1. libreadline5-dev, 2. zlib1g-dev, 3. bison (YACC), 4. flex and where to save them to on disk?

I ran ./configure --prefix=$HOME/project --enable-depend --enable-cassert --enable-debug and it seems to have completed with no errors, but I do not see anything at $HOME/project?

I installed Eclipse CDT and added the include paths to the Environment: Screenshot of Eclipse Environment

I imported the project as Existing Code as Makefile Project.

When I try to build the project Eclipse says Info: Nothing to build for postgres

When I try to run it a dialog box says Unable to Launch. The selection can not be launched and there are no recent launches

How can I run/debug PostgreSQL in Eclipse on Windows?

Thanks!

isapir
  • 21,295
  • 13
  • 115
  • 116

2 Answers2

2

I recommend just using the prebuilt postgresql package provided by MSYS2. To install the 64-bit version, run:

pacman -S mingw-w64-x86_64-postgresql

You can see the scripts that were used to build it here:

https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-postgresql

David Grayson
  • 84,103
  • 24
  • 152
  • 189
  • I don't want to use a prebuilt package, I want to build it from source. I will check out the scripts you cited. Upvoting your answer for now. Thanks! – isapir Jan 12 '16 at 16:48
0

I was able to build PostgreSQL with MSYS2 and MinGW-w64, and I documented it in a video tutorial: How to build PostgreSQL from source on Windows

isapir
  • 21,295
  • 13
  • 115
  • 116