[GENERAL] Undefined Reference
I'm apologizing in advance for the double post. Since my first one wasn't composed very thoughtfull and hasn't gotten any responses. Im new to postgresql and trying to create a new Clause in the source code. Thanks to some advice in this Mailing List I've been able to start coding. I'm using Windows 7 as a operating System and building the source code with MSYS2 MingGw. It seems I'm missing something very simple in the Libary Files looking at the Error Code. But since im new to this it really feels like a Roadblock can someone give me advice what to do or where to add the missing references? I added a File src\backend\executor\nodeDelFil which includes #include "utils/tuplewindow.h" but I get following Error: x86_64-w64-mingw32-gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -L../../src/port -L../../src/common -Wl,--allow-multiple-definition -Wl,--disable-auto-import -Wl,--as-needed -Wl,--stack=4194304 -Wl,--export-all-symbols -Wl,--out-implib=libpostgres.a access/brin/brin.o access/brin/brin_pageops.o... ... ../../src/common/libpgcommon_srv.a win32ver.o -lws2_32 -lm -lws2_32 -lsecur32 -o postgres.exe make[2]: *** [Makefile:86: postgres] Error 1.. ..executor/nodeDelFil.o:nodeDelFil.c:(.text+0x22): undefined reference to `tuplewindow_end' executor/nodeDelFil.o:nodeDelFil.c:(.text+0x43): undefined reference to `tuplewindow_begin' executor/nodeDelFil.o:nodeDelFil.c:(.text+0x306): undefined reference to `tuplewindow_rewind' executor/nodeDelFil.o:nodeDelFil.c:(.text+0x324): undefined reference to `tuplewindow_ateof' executor/nodeDelFil.o:nodeDelFil.c:(.text+0x336): undefined reference to `tuplewindow_gettupleslot' executor/nodeDelFil.o:nodeDelFil.c:(.text+0x365): undefined reference to `tuplewindow_movenext' executor/nodeDelFil.o:nodeDelFil.c:(.text+0x36d): undefined reference to `tuplewindow_ateof' executor/nodeDelFil.o:nodeDelFil.c:(.text+0x385): undefined reference to `tuplewindow_puttupleslot' executor/nodeDelFil.o:nodeDelFil.c:(.text+0x3a9): undefined reference to `tuplewindow_removecurrent' executor/nodeDelFil.o:nodeDelFil.c:(.text+0x3da): undefined reference to `tuplewindow_setinsertrank' executor/nodeDelFil.o:nodeDelFil.c:(.text+0x413): undefined reference to `tuplewindow_setinsertrank' collect2.exe: error: ld returned 1 exit status Every Help would be greatly appreciated.
[GENERAL] Undefined reference with libpq on Visual Studio 2012
Hello all, I'm trying to build libpq using nmake from Visual Studio 2012. So I've tried the following : nmake -f win32.mak CPU=AMD64 while in postgresql-9.2.4/src directory. It does the following : link.exe -lib @C:\Users\markand\AppData\Local\Temp\nm2F60.tmp rc.exe /l 0x409 /fo".\Release\libpq.res" libpq-dist.rc Microsoft (R) Windows (R) Resource Compiler Version 6.2.9200.16384 Copyright (C) Microsoft Corporation. All rights reserved. link.exe @C:\Users\markand\AppData\Local\Temp\nm303B.tmp libpqdll.def : error LNK2001: symbole externe non résolu PQbackendPID libpqdll.def : error LNK2001: symbole externe non résolu PQbinaryTuples libpqdll.def : error LNK2001: symbole externe non résolu PQcancel libpqdll.def : error LNK2001: symbole externe non résolu PQclear libpqdll.def : error LNK2001: symbole externe non résolu PQclientEncoding libpqdll.def : error LNK2001: symbole externe non résolu PQcmdStatus libpqdll.def : error LNK2001: symbole externe non résolu PQcmdTuples libpqdll.def : error LNK2001: symbole externe non résolu PQconndefaults libpqdll.def : error LNK2001: symbole externe non résolu PQconnectPoll libpqdll.def : error LNK2001: symbole externe non résolu PQconnectStart libpqdll.def : error LNK2001: symbole externe non résolu PQconnectStartParams libpqdll.def : error LNK2001: symbole externe non résolu PQconnectdb libpqdll.def : error LNK2001: symbole externe non résolu PQconnectdbParams libpqdll.def : error LNK2001: symbole externe non résolu PQconnectionNeedsPasswo rd libpqdll.def : error LNK2001: symbole externe non résolu PQconnectionUsedPasswor d libpqdll.def : error LNK2001: symbole externe non résolu PQconninfoFree libpqdll.def : error LNK2001: symbole externe non résolu PQconninfoParse libpqdll.def : error LNK2001: symbole externe non résolu PQconsumeInput libpqdll.def : error LNK2001: symbole externe non résolu PQcopyResult libpqdll.def : error LNK2001: symbole externe non résolu PQdb libpqdll.def : error LNK2001: symbole externe non résolu PQdescribePortal libpqdll.def : error LNK2001: symbole externe non résolu PQdescribePrepared libpqdll.def : error LNK2001: symbole externe non résolu PQdisplayTuples libpqdll.def : error LNK2001: symbole externe non résolu PQdsplen libpqdll.def : error LNK2001: symbole externe non résolu PQencryptPassword libpqdll.def : error LNK2001: symbole externe non résolu PQendcopy libpqdll.def : error LNK2001: symbole externe non résolu PQenv2encoding libpqdll.def : error LNK2001: symbole externe non résolu PQerrorMessage libpqdll.def : error LNK2001: symbole externe non résolu PQescapeBytea libpqdll.def : error LNK2001: symbole externe non résolu PQescapeByteaConn libpqdll.def : error LNK2001: symbole externe non résolu PQescapeIdentifier libpqdll.def : error LNK2001: symbole externe non résolu PQescapeLiteral libpqdll.def : error LNK2001: symbole externe non résolu PQescapeString libpqdll.def : error LNK2001: symbole externe non résolu PQescapeStringConn libpqdll.def : error LNK2001: symbole externe non résolu PQexec libpqdll.def : error LNK2001: symbole externe non résolu PQexecParams libpqdll.def : error LNK2001: symbole externe non résolu PQexecPrepared libpqdll.def : error LNK2001: symbole externe non résolu PQfformat libpqdll.def : error LNK2001: symbole externe non résolu PQfinish libpqdll.def : error LNK2001: symbole externe non résolu PQfireResultCreateEvent s libpqdll.def : error LNK2001: symbole externe non résolu PQflush libpqdll.def : error LNK2001: symbole externe non résolu PQfmod libpqdll.def : error LNK2001: symbole externe non résolu PQfn libpqdll.def : error LNK2001: symbole externe non résolu PQfname libpqdll.def : error LNK2001: symbole externe non résolu PQfnumber libpqdll.def : error LNK2001: symbole externe non résolu PQfreeCancel libpqdll.def : error LNK2001: symbole externe non résolu PQfreeNotify libpqdll.def : error LNK2001: symbole externe non résolu PQfreemem libpqdll.def : error LNK2001: symbole externe non résolu PQfsize libpqdll.def : error LNK2001: symbole externe non résolu PQftable libpqdll.def : error LNK2001: symbole externe non résolu PQftablecol libpqdll.def : error LNK2001: symbole externe non résolu PQftype libpqdll.def : error LNK2001: symbole externe non résolu PQgetCancel libpqdll.def : error LNK2001: symbole externe non résolu PQgetCopyData libpqdll.def : error LNK2001: symbole externe non résolu PQgetResult libpqdll.def : error LNK2001: symbole externe non résolu PQgetisnull libpqdll.def : error LNK2001: symbole externe non résolu PQgetlength libpqdll.def : error LNK2001: symbole externe non résolu PQgetline libpqdll.def : error LNK2001: symbole externe non résolu PQgetlineAsync libpqdll.def : error LNK2001: symbole externe non résolu PQgetssl libpqdll.def : error LNK2001: symbole externe non résolu PQgetvalue libpqdll.def : error LNK2001: symbole externe non résolu PQhost libpqdll.def : error LNK2001: symbole externe non résolu PQinitOpenSSL libpqdll.def : error LNK2001: symbole externe
Re: [GENERAL] undefined reference to `PQprepare' with postgresql-dev 7.4.7-6sarge2
Ok, I've upgraded to: $ dpkg -l | grep postgres ii postgresql-8.1 8.1.4-4bpo1object-relational SQL database, version 8.1 ii postgresql-cli 8.1.4-4bpo1front-end programs for PostgreSQL 8.1 ii postgresql-cli 57bpo1 manager for multiple PostgreSQL client versi ii postgresql-com 57bpo1 manager for PostgreSQL database clusters ii postgresql-con 8.1.4-4bpo1additional facilities for PostgreSQL ii postgresql-doc 8.1.4-4bpo1documentation for the PostgreSQL database ma $ dpkg -l | grep pq ii libpq-dev 8.1.4-4bpo1header files for libpq4 (PostgreSQL library) ii libpq4 8.1.4-4bpo1PostgreSQL C client library using http://www.backports.org/dokuwiki/doku.php and now my program compiles and PQprepare is there: $ objdump -x /usr/lib/libpq.a | grep -iw PQprepare 16a0 g F .text 0086 PQprepare Regards Alex -- http://preferans.de ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [GENERAL] undefined reference to `PQprepare' with postgresql-dev 7.4.7-6sarge2
Yes, I'm sorry I didn't expect that it wasn't there (coming to libpq-programming from Perl, where there is always a prepare() function) How could I detect (#ifdef WHAT) an older PostgreSQL version in my C-code? And is there maybe an easy workaround for a missing PQprepare? On 8/24/06, Tom Lane <[EMAIL PROTECTED]> wrote: "Alexander Farber" <[EMAIL PROTECTED]> writes: > Does anybody have an idea please, what could I be doing wrong? Trying to use a subroutine added in 8.0 in 7.4. Regards Alex -- http://preferans.de ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [GENERAL] undefined reference to `PQprepare' with postgresql-dev 7.4.7-6sarge2
"Alexander Farber" <[EMAIL PROTECTED]> writes: > Does anybody have an idea please, what could I be doing wrong? Trying to use a subroutine added in 8.0 in 7.4. regards, tom lane ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [GENERAL] undefined reference to `PQprepare' with postgresql-dev 7.4.7-6sarge2
I've also checked http://www.postgresql.org/docs/7.4/interactive/libpq-exec.html and PQprepare() isn't mentioned there at all. Wasn't it provided in PostgreSQL version 7? Is there a way to workaround it? Maybe by using pqPrepareAsyncResult()? And how could I #ifdef in my libpq-program, to detect an older PostgreSQL version? The headers /usr/include/postgresql/libpq-fe.h and /usr/include/postgresql/postgres_ext.h don't have any PG_VERSION or similar define... On 8/24/06, Alexander Farber <[EMAIL PROTECTED]> wrote: I'm trying to compile a libpq program under Debian 3.1r2 with these packages installed: $ dpkg -l | grep postgres ii postgresql 7.4.7-6sarge2 object-relational SQL database management sy ii postgresql-cli 7.4.7-6sarge2 front-end programs for PostgreSQL ii postgresql-con 7.4.7-6sarge2 additional facilities for PostgreSQL ii postgresql-dev 7.4.7-6sarge2 development files for libpq (PostgreSQL libr ii postgresql-doc 7.4.7-6sarge2 documentation for the PostgreSQL database ma On Debian it unfortunately doesn't link: $ gcc build/pref.o build/message.o build/pgsql.o build/user.o build/util.o build/table.o build/common.o build/array.o build/xstring.o build/strlcpy.o build/strlcat.o build/daemon.o -o pref -L /usr/lib -L /usr/lib/postgresql/lib -lpq build/pgsql.o(.text+0x15b): In function `db_prepare': server/pgsql.c:57: undefined reference to `PQprepare' collect2: ld returned 1 exit status $ pg_config --version PostgreSQL 7.4.7 $ pg_config --libdir /usr/lib $ objdump -x /usr/lib/libpq.a | grep -i PQprepare *UND* pqPrepareAsyncResult 1974 R_386_PLT32 pqPrepareAsyncResult 0490 g F .text 007d pqPrepareAsyncResult 12e5 R_386_PLT32 pqPrepareAsyncResult 130a R_386_PLT32 pqPrepareAsyncResult *UND* pqPrepareAsyncResult 1841 R_386_PLT32 pqPrepareAsyncResult There are very few hits for the "undefined reference PQprepare" on Google (which I take a good sign :-) Does anybody have an idea please, what could I be doing wrong? Why doesn't objdump find PQprepare, but finds PQconnectdb? $ objdump -x /usr/lib/libpq.a | grep -i PQconnectdb g F .text 0042 PQconnectdb Thank you Alex PS: And here is the code failing to link (my server/pgsql.c) probably nothing special: #define DB_CONN_STR "host=/tmp user=XXX dbname=XXX" #define SQL_FETCH_USER \ "select username, user_avatar from phpbb_users where user_active = 1 " \ "and user_id = $1 and user_password = $2 and user_id not in " \ "(select ban_userid from phpbb_banlist where ban_userid is not null)" .. static void db_reconnect() { PQreset(conn); if (PQstatus(conn) != CONNECTION_OK) { warn("Connection to db '%s' failed: %s", DB_CONN_STR, PQerrorMessage(conn)); sleep(RETRY_INTERVAL); return; } db_prepare("sql_fetch_user", SQL_FETCH_USER, 2); } void db_prepare(const char *stname, const char *query, int nparams) { PGresult* res; res = PQprepare(conn, stname, query, nparams, NULL); if (PQresultStatus(res) != PGRES_COMMAND_OK) { PQclear(res); db_disconnect(); die("Preparing statement '%s' failed: %s", query, PQerrorMessage(conn)); } PQclear(res); } .. -- http://preferans.de ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [GENERAL] undefined reference to `PQprepare' with postgresql-dev
Alexander Farber wrote: > Hello, > > I'm trying to compile a libpq program under Debian 3.1r2 with these > packages installed: > > $ dpkg -l | grep postgres > ii postgresql 7.4.7-6sarge2 object-relational SQL database > management sy > ii postgresql-cli 7.4.7-6sarge2 front-end programs for PostgreSQL > ii postgresql-con 7.4.7-6sarge2 additional facilities for PostgreSQL > ii postgresql-dev 7.4.7-6sarge2 development files for libpq > (PostgreSQL libr > ii postgresql-doc 7.4.7-6sarge2 documentation for the PostgreSQL > database ma > > That program compiles and works fine with OpenBSD > and Cygwin (I'm using PostgreSQL 8.x there though...) > > On Debian it unfortunately doesn't link: > > $ gcc build/pref.o build/message.o build/pgsql.o build/user.o > build/util.o build/table.o build/common.o build/array.o > build/xstring.o build/strlcpy.o build/strlcat.o build/daemon.o -o pref > -L /usr/lib -L /usr/lib/postgresql/lib -lpq > build/pgsql.o(.text+0x15b): In function `db_prepare': > server/pgsql.c:57: undefined reference to `PQprepare' > collect2: ld returned 1 exit status > > $ pg_config --version > PostgreSQL 7.4.7 > > $ pg_config --libdir > /usr/lib > > $ objdump -x /usr/lib/libpq.a | grep -i PQprepare > *UND* pqPrepareAsyncResult > 1974 R_386_PLT32 pqPrepareAsyncResult > 0490 g F .text 007d pqPrepareAsyncResult > 12e5 R_386_PLT32 pqPrepareAsyncResult > 130a R_386_PLT32 pqPrepareAsyncResult > *UND* pqPrepareAsyncResult > 1841 R_386_PLT32 pqPrepareAsyncResult > > There are very few hits for the "undefined reference PQprepare" > on Google (which I take a good sign :-) > > Does anybody have an idea please, what could I be doing wrong? there is no PQprepare in 7.4 - it got introduced in 8.0 (it is not mentioned in the 7.4 manual either) ... Stefan ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
[GENERAL] undefined reference to `PQprepare' with postgresql-dev 7.4.7-6sarge2
Hello, I'm trying to compile a libpq program under Debian 3.1r2 with these packages installed: $ dpkg -l | grep postgres ii postgresql 7.4.7-6sarge2 object-relational SQL database management sy ii postgresql-cli 7.4.7-6sarge2 front-end programs for PostgreSQL ii postgresql-con 7.4.7-6sarge2 additional facilities for PostgreSQL ii postgresql-dev 7.4.7-6sarge2 development files for libpq (PostgreSQL libr ii postgresql-doc 7.4.7-6sarge2 documentation for the PostgreSQL database ma That program compiles and works fine with OpenBSD and Cygwin (I'm using PostgreSQL 8.x there though...) On Debian it unfortunately doesn't link: $ gcc build/pref.o build/message.o build/pgsql.o build/user.o build/util.o build/table.o build/common.o build/array.o build/xstring.o build/strlcpy.o build/strlcat.o build/daemon.o -o pref -L /usr/lib -L /usr/lib/postgresql/lib -lpq build/pgsql.o(.text+0x15b): In function `db_prepare': server/pgsql.c:57: undefined reference to `PQprepare' collect2: ld returned 1 exit status $ pg_config --version PostgreSQL 7.4.7 $ pg_config --libdir /usr/lib $ objdump -x /usr/lib/libpq.a | grep -i PQprepare *UND* pqPrepareAsyncResult 1974 R_386_PLT32 pqPrepareAsyncResult 0490 g F .text 007d pqPrepareAsyncResult 12e5 R_386_PLT32 pqPrepareAsyncResult 130a R_386_PLT32 pqPrepareAsyncResult *UND* pqPrepareAsyncResult 1841 R_386_PLT32 pqPrepareAsyncResult There are very few hits for the "undefined reference PQprepare" on Google (which I take a good sign :-) Does anybody have an idea please, what could I be doing wrong? Why doesn't objdump find PQprepare, but finds PQconnectdb? $ objdump -x /usr/lib/libpq.a | grep -i PQconnectdb g F .text 0042 PQconnectdb Thank you Alex PS: And here is the code failing to link (my server/pgsql.c) probably nothing special: #define DB_CONN_STR "host=/tmp user=XXX dbname=XXX" #define SQL_FETCH_USER \ "select username, user_avatar from phpbb_users where user_active = 1 " \ "and user_id = $1 and user_password = $2 and user_id not in " \ "(select ban_userid from phpbb_banlist where ban_userid is not null)" .. static void db_reconnect() { PQreset(conn); if (PQstatus(conn) != CONNECTION_OK) { warn("Connection to db '%s' failed: %s", DB_CONN_STR, PQerrorMessage(conn)); sleep(RETRY_INTERVAL); return; } db_prepare("sql_fetch_user", SQL_FETCH_USER, 2); } void db_prepare(const char *stname, const char *query, int nparams) { PGresult* res; res = PQprepare(conn, stname, query, nparams, NULL); if (PQresultStatus(res) != PGRES_COMMAND_OK) { PQclear(res); db_disconnect(); die("Preparing statement '%s' failed: %s", query, PQerrorMessage(conn)); } PQclear(res); } .. -- http://preferans.de ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [GENERAL] undefined reference to 'pg_detoast_datum'
D. Stimits wrote: A google search shows very little concerning the pg_detoast_datum undefined reference link error. It is looking more like the V1 has to be skipped and I'll have to go back to V0 if I can't get this to work. You haven't shown us your function, so it's a bit difficult to help, but in any case you do *not* want to use the V0 calling conventions -- they are deprecated and subject to removal in the future. V1 certainly works -- I've done many V1 C functions that accept text arguments. Take a look at some of the contrib folder extensions if you need examples. unless someone can magically make the default PostgreSQL version on RH 7.3 change to a newer version of PostgreSQL, then a newer version can't be used] Why not? I have Postgres 7.3.4 running on my RH 7.3 server. Here are RH 7.3 RPMs: ftp://ftp8.us.postgresql.org/pub/pgsql/binary/v7.3.4/RPMS/redhat-7.3/ Joe ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
Re: [GENERAL] undefined reference to 'pg_detoast_datum'
Joe Conway wrote: D. Stimits wrote: > A google search shows very little concerning the pg_detoast_datum > undefined reference link error. It is looking more like the V1 has to > be skipped and I'll have to go back to V0 if I can't get this to work. You haven't shown us your function, so it's a bit difficult to help, but in any case you do *not* want to use the V0 calling conventions -- they are deprecated and subject to removal in the future. V1 certainly works -- I've done many V1 C functions that accept text arguments. Take a look at some of the contrib folder extensions if you need examples. > unless someone can magically make the default PostgreSQL version on RH > 7.3 change to a newer version of PostgreSQL, then a newer version > can't be used] Why not? I have Postgres 7.3.4 running on my RH 7.3 server. Here are RH 7.3 RPMs: ftp://ftp8.us.postgresql.org/pub/pgsql/binary/v7.3.4/RPMS/redhat-7.3/ I'll consider this, but it greatly complicates things to require users add the non-redhat version. I understand the benefits of doing so, but convincing people to do this just to try out a package is not so easy. Joe Here is a simple echo function that is being used: #include #include #include PG_FUNCTION_INFO_V1(reverse_path); Datum my_echo(PG_FUNCTION_ARGS) { text* arg = PG_GETARG_TEXT_P(0); text* echo_arg = (text *)palloc(sizeof(arg)); memcpy( (void *)(echo_arg), (void *)(arg), sizeof(arg) ); PG_RETURN_TEXT_P(echo_arg); } Keep in mind that this isn't being run yet, it fails at link stage. As another test, I have simplified the above just to test link time (not intended to run, just as a test of link/compile): #include #include PG_FUNCTION_INFO_V1(reverse_path); Datum my_echo(PG_FUNCTION_ARGS) { text* arg = PG_GETARG_TEXT_P(0); PG_RETURN_TEXT_P(arg); } The first function complains at link time of missing link function pg_detoast_datum, CurrentMemoryContext, and MemoryContextAlloc, while the latter complains only of missing pg_detoast_datum. In both cases, link libraries are: -lkrb5 -lk5crypto -lcom_err -lpq -ldl Now I am still scratching my head, wondering how it is that pg_detoast_datum is a V0 function, and I can compile V0 libraries just fine, but can't even compile a V1, which supposedly does not use pg_detoast_data? The additional link failures when using palloc make me feel there is some mysterious unnamed library that is missing when using V1, aside from -lpq. When I go in to compile the src/test/regress/ directory of the source from the rpm used in Redhat 7.3, I see no signs that anything else is required. Something simple must be missing under the PostgreSQL 7.2 version. Is there a separate library that needs linking under a V1 interface, in addition to those named above? D. Stimits ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
[GENERAL] undefined reference to 'pg_detoast_datum'
In PostgreSQL 7.2 (Redhat 7.3 version, so it is patched), I'm trying to create a Version-1 C server extension. The Version-0 format works, the Version-1 version fails with: undefined reference to 'pg_detoast_datum' According to docs at: http://www.postgresql.org/docs/7.2/interactive/xfunc-c.html ...by using Version-1 the pg_detoast_datum is no longer needed. FYI, the function being created takes and returns a text argument. Are the docs there wrong, or is there a bug in the library build, that causes Version-1 to require linking to a lib with pg_detoast_datum? A google search shows very little concerning the pg_detoast_datum undefined reference link error. It is looking more like the V1 has to be skipped and I'll have to go back to V0 if I can't get this to work. [and unless someone can magically make the default PostgreSQL version on RH 7.3 change to a newer version of PostgreSQL, then a newer version can't be used] D. Stimits ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [GENERAL] undefined reference to xxx
On Wed, Jan 31, 2001 at 09:43:50AM +0200, Ismail Tiryaki wrote: > > Hi all, > I have joined this list newly, and I have some question this > question may be solved up to now > > I wrote simple c source this is connect my postgresql database > but when I compile my source I see some errors this is listed below > gcc -g connect.c -o connec /usr/lib/libpg.a -I /usr/include/pgsql > /tmp/cc91os3S.o: In function `exit_nicely': /root/connect.c:7: undefined > reference to `PQfinish' /tmp/cc91os3S.o: In function `main': > /root/connect.c:17: undefined reference to `PQsetdbLogin' > /root/connect.c:18: undefined reference to `PQstatus' /root/connect.c:20: > undefined reference to `PQerrorMessage' collect2: ld returned 1 exit > status > How can I solve this problem?Please help me? > I look forward your message as soon as possible? > Please! I would guess a typo: PQerrorMessage, on my system, is in libpq.a, not libpg.a (which I don't have) Cheers, Patrick
[GENERAL] undefined reference
Greetings! Why I have got the message during installation postgrsql 7.0.2: utils/SUBSYS.o : In function 'load_file': utils/SUBSYS.o (text+0*3465d): undefined reference to 'dlclose' make: *** Error 1. There is the file dlfcn.h in /usr/include. Nina.