How can I set my Cygwin PATH to find postgresql header and library path?

460 Views Asked by At

I am on Windows 7 and installed Cygwin and PostgresSql-8.4 on it. I have an open-source application written in C that requires to be build and for that, I am using Cygwin.

My problem is with setting the path for PostgreSql in Cygwin. As per the instruction that came with open-source, the build requires me to export path to postgreSql header and library path as follows:

export ENV_PG_INC_PATH=/usr/include/pgsql

export ENV_PG_LIB_PATH=/usr/lib/pgsql

I tried to export the same path in Windows using Cygwin as follows:

  • export ENV_PG_INC_PATH=$ENV_PG_INC_PATH:"/cygdrive/C/Program Files (x86)/PostgreSQL/8.4/include"

  • export ENV_PG_LIB_PATH=$ENV_PG_LIB_PATH:"/cygdrive/C/Program Files (x86)/PostgreSQL/8.4/lib"

But this doesn't seems to be working as when I try to access the dll's or any exe's inside these folders, it throws the error as follows:

-bash: _int.dll: command not found

I don't know what is it that I am doing wrong as I am new to Cygwin. Any help would be appreciated.

Thanks in advance.

1

There are 1 best solutions below

0
On

You have to escape all spaces in file paths:

export ENV_PG_LIB_PATH=$ENV_PG_LIB_PATH:"/cygdrive/C/Program\ Files\ (x86)/PostgreSQL/8.4/lib"