Thank you for an excellent idea. I’ll make note of it.
Regards,
Tena Sakai
tsakai@xxxxxxxxxxxxxx
On 12/4/09 5:18 AM, "Alvaro Herrera" <alvherre@xxxxxxxxxxxxxxxxx> wrote:
Tena Sakai wrote:
> Hi Tom,
>
> Please ignore what I wrote before. I got it. I mean I got it compiled
> successfully on the centOS machine. I was stupid and blind. In order
> to compile, I created an alias for cc with long string for include and
> lib directories. Which was not a bad idea, but I had a typo in my
> alias. Therefore it didn't find the libpq-fe.h file and I screwed that
> up even worse by supplying desired files in the current directory
> from the other machine. I corrected the alias, removed the header
> files in the source directory, and then compilation went smoothly and
> I can now test the program.
FWIW you should always prefer pg_config to help you get the right
compile flags; something like
gcc -I`pg_config --includedir` -L`pg_config --libdir` -lpq ...
That gets you the right include and lib dirs.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.