From owner-freebsd-questions@FreeBSD.ORG Thu Nov 27 10:46:25 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C10B916A4CF for ; Thu, 27 Nov 2003 10:46:25 -0800 (PST) Received: from smtp-relay.dca.net (smtp-relay.dca.net [216.158.48.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED3ED43F93 for ; Thu, 27 Nov 2003 10:46:24 -0800 (PST) (envelope-from blairs@isc.upenn.edu) Received: from isc.upenn.edu (unknown [207.245.73.228]) by smtp-relay.dca.net (Postfix) with ESMTP id 4986C314FAA for ; Thu, 27 Nov 2003 13:44:43 -0500 (EST) Message-ID: <3FC64697.9090903@isc.upenn.edu> Date: Thu, 27 Nov 2003 13:46:47 -0500 From: Steve Blair User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6a) Gecko/20031030 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: MySQL v3.23 and C API X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2003 18:46:25 -0000 Hello: I'm working on a server running FreeBSD 4.7-RELEASE. I've developed a C server program that works fine. I want to add code to read from and update fields in a MySQL database to the original program. When I do I get compilation errors that I cannot seem to resolve. I have a number of packages installed. The ones that seem related are: gmake-3.79.1_3 GNU version of 'make' utility mysql-client-3.23.52 Multithreaded SQL database (client) mysql-server-3.23.52_1 Multithreaded SQL database (server) The errors I get are as follows. I get these if using cc or gcc to compile the program. host# cc -o locserv locserv.c /tmp/ccJdDxg3.o: In function `main': /tmp/ccJdDxg3.o(.text+0x6ca): undefined reference to `mysql_init' /tmp/ccJdDxg3.o(.text+0x7bc): undefined reference to `mysql_real_query' /tmp/ccJdDxg3.o(.text+0x7f3): undefined reference to `mysql_store_result' /tmp/ccJdDxg3.o(.text+0x80d): undefined reference to `mysql_num_rows' /tmp/ccJdDxg3.o(.text+0x877): undefined reference to `mysql_fetch_row' Can anyone help explain what the problem is and how to correct it? Thanks,Steve blairs@isc.upenn.edu