Thread: Error Message while Trying To Run A Compiled libpq.h file.

Error Message while Trying To Run A Compiled libpq.h file.

From
"Daniel R. Anderson"
Date:
Hi,

I'm experimenting with the libpq.h file and tried compiling the
testlibpq.c file as follows:

1.  I edited testlibpq.c so that instead of NULL it was looking for my host.
2.  I tried compiling by:

$ gcc ./testlibpq.c -o testlibpq.compiled -I /usr/local/pgsql/include -L
/usr/local/pgsql/lib -lpq

3.  Now, when I tried to run it, i.e. (./testlibpq.compiled) I get the
following error:

/usr/libexec/ld.so: testlibpq.compiled: libpq.so.3.0: No such file or
directory

What am I doing wrong?

Thanks,

Dan