Hi Again,

I compiled the example program from the README file in the source 
distribution.

Here is my compile command:
g++ testFromSrc.cpp -Wall -L/usr/local/pgsql/include -lpqxx  
-L/usr/local/pgsql/lib -lpq -o testFromSrc.cpx 

It compiles. However when I try to run the program it cannot find libpq 
and produces the following -
/testFromSrc.cpx: error while loading shared libraries: libpq.so.4: 
cannot open shared object file: No such file or directory

Libpq is not found. I can run this if I set LD_LIBRARY_PATH before I run 
the program. (For whatever reason setting LD_LIBRARY_PATH in 
.bash_profile or /etc/profile does not take.)

Is there a work around for this so that LD_LIBRARY_PATH does not have to 
be set each time? I am concerned that when I eventually send my program 
to some web hosting company they may not take kindly to LD_LIBRARY_PATH.

I realize that this question is probably less relevant to the mailing 
list then it should be but any help would be most appreciated.

Rabin
_______________________________________________
Libpqxx-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/libpqxx-general

Reply via email to