Re: [GENERAL] Problem with compiled C

Поиск
Список
Период
Сортировка
От Héctor Morales
Тема Re: [GENERAL] Problem with compiled C
Дата
Msg-id 37B2221E.E6AFC8F7@edisa.com.gt
обсуждение исходный текст
Ответ на Re: [GENERAL] Problem with compiled C  (Charles Tassell <ctassell@isn.net>)
Ответы Re: [GENERAL] Problem with compiled C  (Howie <caffeine@toodarkpark.org>)
Список pgsql-general
Charles Tassell wrote:

> >From an xterm / command prompt, type:
>
>  ps auxw |grep postmaster
>
>   Make sure the postmaster is running with the -i option (ie, postmaster -i
> -B 256) If you are running pgaccess on a different machine than PostGres is
> running on, you'll also have to edit the pg_hba.conf to make sure you are
> allowed to connect from the remote machine.
>
>   To compile C programs you need to add the pq library, so use something like:
> gcc -o test test.c -lpq
>
> Good luck.
>
> At 04:24 PM 8/11/99, Héctor Morales wrote:
> >Hi , I have two problems.
> >
> >1. When a use pgacces, i try connect with one database, responde the
> >next error.
> >        Error trying to connect to database "xxxx" on host "xxx"
> >        PostgreSQL error message: Connection to database failed
> >connectDB() --connect() failed: Connection refused Is the postmaster
> >running (whit -i) at "xxx" and accepting connections on TCP/IP por
> >"5432".
> >
> >    I use Postgresql 6.5, on RedHat 6. I don't know why not connect.
> >
> >2. When i compiled one program in C, I don't  Know what parameter i use
> >with gcc
> >but i compilied the example of the testc.c in manual of programmer no
> >indicate How to compiled.
> >
> >
> >Thanks for yor help.
> >
> >
> >

Excellent pgaccess  work is great.

So  when I compiled my program in C use
gcc -o prueba prueba.c  -llibpq.so

responde
    /usr/bin/ld: cannot open -llibpg.so : no such file or directory
    collect2: ld returned 1 exit status

I  probe with
gcc -o prueba prueba.c  -llibpq.so -L/usr/lib

But equal , I sure that the library is in this directory and a observe the
LD_LIBRARY_PATH and the directory  is in this variable.

So i don't Know why not compiled.

Thanks



В списке pgsql-general по дате отправления:

Предыдущее
От: Charles Tassell
Дата:
Сообщение: Re: [GENERAL] Problem with compiled C
Следующее
От: Howie
Дата:
Сообщение: Re: [GENERAL] Problem with compiled C