1

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.

2
  • bash: _int.dll: command not found -- You seem to be attempting to execute a DLL?? Commented Sep 9, 2013 at 8:24
  • The question is not about the execution. I need to be able to set the path to those directories using export and if I might succeed, the result would be as follows: -bash: /cygdrive/C/Program Files (x86)/PostgreSQL/8.4/lib/_int.dll: cannot execute binary file I don't have to execute any dll, just set the path correctly and proceed with the build process. Commented Sep 9, 2013 at 8:28

1 Answer 1

2

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"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.