Received: from crowfix.com (qmailr@crowfix.crowfix.com [207.228.46.42]) by hub.org (8.8.8/8.7.5) with SMTP id QAA10199 for ; Sun, 24 May 1998 16:55:00 -0400 (EDT) Received: (qmail 22285 invoked by uid 501); 24 May 1998 20:55:06 -0000 Date: 24 May 1998 20:55:06 -0000 Message-ID: <19980524205506.22284.qmail@crowfix.com> From: Felix Morley Finch To: pgsql-interfaces@postgresql.org Subject: C++ linking problems (newbie mode) X-Mailer: VM 6.34 under Emacs 20.2.1 I've been teaching myself SQL for the last year or so, using Postgres. One of my first projects was putting my CDs into a database. I've written the access program in Perl (both standalone and CGI-BIN), Java, and C (with Gtk). I figured I woudl give it a whack in C++ too. Quite a learning experience! My first experience with Gtk was the C program, so I'm basically learning 3 things at once (Gtk, C++, libpq++). And I'm getting a bunch of link errors. Here's my Makefile: ccds: ccds.cc g++ -O -Wall -I/usr/local/pgsql/include -I/usr/local/lib/glib/include -I/usr/local/include -I/usr/X11R6/include -L/usr/local/pgsql/lib -lpq++ -lpq -lcrypt -L/usr/local/lib -L/usr/X11R6/lib -lgtk -lgdk -lglib -lXext -lX11 -lm -lgtkmm ccds.cc -o ccds Gosh that's a mouthful :-) And here's some of the result: /tmp/cca222721.o: In function `cds_editRow::changeCallback(int)': /tmp/cca222721.o(.text+0x75d): undefined reference to `PgConnection::ExecTuplesOk(char const *)' /tmp/cca222721.o(.text+0xa06): undefined reference to `PgConnection::ExecCommandOk(char const *)' /tmp/cca222721.o(.text+0x35a9): undefined reference to `PgConnection::PgConnection(char const *)' /tmp/cca222721.o(.text+0x35df): undefined reference to `PgConnection::Status(void)' /tmp/cca222721.o(.gnu.linkonce.t._._10PgDatabase+0x13): undefined reference to `PgConnection::~PgConnection(void)' /tmp/cca222721.o: In function `PgDatabase type_info function': /tmp/cca222721.o(.gnu.linkonce.t.__tf10PgDatabase+0xd): undefined reference to `PgConnection type_info function' /tmp/cca222721.o(.gnu.linkonce.t.__tf10PgDatabase+0x12): undefined reference to `PgConnection type_info node' collect2: ld returned 1 exit status make: *** [ccds] Error 1 I tried supplying my own minimal PgDatabase class; the link succeeds, the program runs, but it's not very useful... This must be pretty basic, so if someone wants to just send email and not clutter the list, that's fine with me. -- ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._. Felix Finch: scarecrow repairman & rocket surgeon / felix@crowfix.com PGP = 91 B3 94 7C E9 E8 76 2D E1 63 51 AA A0 48 89 2F ITAR license #4933 I've found a solution to Fermat's Last Theorem but I see I've run out of room o