mysql:4701
From: Kazuya Imabayashi <Kazuya Imabayashi <Kazuya@xxxxxxxxxx>>
Date: Sat, 24 Nov 2001 15:36:53 +0900
Subject: [mysql 04701] VC++ で C API 使用時の問題
こんにちは
API初心者今林と申します。
VC++ 6 SP4でごく簡単なCのプログラムをコンパイルすると、
話にならいほど数のエラーがコンパイル時に返ってきます。
エラーは、ほとんどすべてmysql.hの構文エラーなどです。(中括弧がどうのこうの
というものなど)
必ず、基本的なミスをしていると思います。ご指摘いただけたらと思います。
以下のコードです。
/* client1.c */
#include <stdio.h>
#include <mysql.h>
#define def_host_name
#define def_user_name
#define def_password
#define def_db_name
MYSQL   *conn; 
void
main (int argc, char *argv[])
{
    conn = mysql_init (NULL);
    mysql_real_connect (
                conn,           /* pointer to connection handler */
                def_host_name,  /* host to connect to */
                def_user_name,  /* user name */
                def_password,   /* password */
                def_db_name,    /* database to use */
                0,              /* port (use default) */
                NULL,           /* socket (use default) */
                0);             /* flags (none) */
    mysql_close (conn);
}
よろしくお願いします
今林
-> 4701 2001-11-24 15:36 [Kazuya Imabayashi <K] VC++ で C API 使用時の問題 4702 2001-11-24 22:02 ┣["TAKAHASHI, Tomohiro] 4704 2001-11-25 12:13 ┗["Yamaguchi, Junji" <]