From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <42A84020.9000002@geeksforless.net> Date: Thu, 09 Jun 2005 16:12:00 +0300 From: Eugene Brusilovsky User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.7.2) Gecko/20040808 X-Accept-Language: ru-ru, ru MIME-Version: 1.0 To: community@altlinux.org X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at geeksforless.net Cc: Subject: [Comm] Compiling C + MySQL X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: community@altlinux.ru List-Id: Mailing list for ALT Linux users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2005 13:12:05 -0000 Archived-At: List-Archive: List-Post: Привет! Пытаюсь скомпилировать минимальную прогу на С, которая подключается серверу MySQL: #include "mysql.h" MYSQL link; int main() { if (!mysql_connect(&link, "localhost", "user", "temp111")) { printf("Connection error\n"); } else { mysql_close(&link); } return 1; } Пытаюсь скомпилить при помощи: gcc -I/usr/include/mysql -L/usr/lib/mysql database.c -o database -lm -lmysqlclient На выходе: /tmp/ccQG29CC.o(.text+0x25): In function `main': database.c: undefined reference to `mysql_connect' collect2: ld returned 1 exit status Подскажите, в чем проблема, плз.