Re: C & C ++Program Problem
От | Arindam Haldar |
---|---|
Тема | Re: C & C ++Program Problem |
Дата | |
Msg-id | 3CE3575F.5050303@hotpop.com обсуждение исходный текст |
Ответ на | C & C ++Program Problem (Arindam Haldar <arindamhaldar@hotpop.com>) |
Список | pgsql-interfaces |
hi, thanx for the hint. am re-entering c programming from DOS world !--my apologies as am again a learner. 1 more Query on to this. POstgres-7.2 was not configured with-->--with-gnu-ld , which i just saw is default set to no... So can that be problem while compling C & C++ prorgrames ? thanx again in advance for ur help. A.H Nigel J. Andrews wrote: You need to read the error messages. It's not a postgres issue it's a linking issue. Try giving the -lpq flag to gcc. On Thu, 16 May 2002, Arindam Haldar wrote: hi all, am trying to use C & C++ libraries with postgresql 7.2. while compiling a sample programe(attached) there were thse errors encounterd !.. [arindam@my src]$ [arindam@my src]$ gcc egTry.c /tmp/ccTLiExh.o: In function `main': /tmp/ccTLiExh.o(.text+0x12): undefined reference to `PQconnectdb' /tmp/ccTLiExh.o(.text+0x2b): undefined reference to `PQstatus' /tmp/ccTLiExh.o(.text+0x5c): undefined reference to `PQerrorMessage' /tmp/ccTLiExh.o(.text+0xac): undefined reference to `PQexec' /tmp/ccTLiExh.o(.text+0xc5): undefined reference to `PQresultStatus' /tmp/ccTLiExh.o(.text+0xf3): undefined reference to `PQclear' /tmp/ccTLiExh.o(.text+0x104): undefined reference to `PQfinish' /tmp/ccTLiExh.o(.text+0x12e): undefined reference to `PQntuples' /tmp/ccTLiExh.o(.text+0x159): undefined reference to `PQgetvalue' /tmp/ccTLiExh.o(.text+0x186): undefined reference to `PQclear' /tmp/ccTLiExh.o(.text+0x197): undefined reference to `PQfinish' collect2: ld returned 1 exit status [arindam@my src]$ lib & include dir are in /usr/lib/pgsql-7.2 & /usr/include/pgsql-7.2. i have tried to compliethis programme with RH7.2(with postgres rpm & a configured from tar file).. i need help pls... i want to use C or C++ thanking u in advance A.H
В списке pgsql-interfaces по дате отправления: