Hello!

I've had that same problem. I don't know the cause of the problem, but I solved it by 
replacing:

my_socket fd;                   /* For Perl DBI/dbd */

by

/* my_socket fd;        */              /* For Perl DBI/dbd */
  
So, simply edit the mysql_com.h file and comment it out!

Greetings,

Dick Doornbos


> ----------------------------------------
> From: ARAKON <[EMAIL PROTECTED]>
> Sent: Tue Aug 21 11:50:14 GMT+02:00 2001
> To: <[EMAIL PROTECTED]>
> Subject: Cannot build with C++
> 
> 
> i'm using mysql 3.23.40 for windows, when i try to build one very 
> simple application, it shows me that error:
> 
> e:\pere\mysql 3.23.40 server\include\mysql_com.h(115) : error C2146: 
> syntax error : missing ';' before identifier 'fd'
> e:\pere\mysql 3.23.40 server\include\mysql_com.h(115) : error 
> C2501: 'SOCKET' : missing storage-class or type specifiers
> e:\pere\mysql 3.23.40 server\include\mysql_com.h(115) : error 
> C2501: 'fd' : missing storage-class or type specifiers
> 
> The line it marks is:
> 
> typedef struct st_net {
>   Vio* vio;
>  >>>>> my_socket fd;                  /* For Perl DBI/dbd */
>   int fcntl;
>   unsigned char *buff,*buff_end,*write_pos,*read_pos;
>   char last_error[MYSQL_ERRMSG_SIZE];
>   unsigned int last_errno,max_packet,timeout,pkt_nr;
>   unsigned char error;
>   my_bool return_errno,compress;
>   my_bool no_send_ok; /* needed if we are doing several
>    queries in one command ( as in LOAD TABLE ... FROM MASTER ),
>    and do not want to confuse the client with OK at the wrong time
>                     */
>   unsigned long remain_in_buf,length, buf_length, where_b;
>   unsigned int *return_status;
>   unsigned char reading_or_writing;
>   char save_char;
> } NET;
> 
> I've tried to cancel it marking as comment, but compiler still searches 
> it (i cannot understand it, but it does, when marked with // or /* as a 
> comment, there's also the error)
> 
> The cpp i'm trying to compile is this:
> 
> #include <stdio.h>
> #include "mysql.h"
> #include <windows.h>
> 
> //NULL siempre mayusculas
> #define def_host_name NULL  //host al que conectamos, predeterminado 
> localhost
> #define def_user_name NULL  //nombre de usuario, predeterminado el 
> propio
> #define def_password NULL     //contraseña, predeterminada ninguna
> #define def_db_name NULL  //base de datos a usar, predeterminada, 
> ninguna.
> 
> MYSQL* conn;  //puntero al manejador(estructura) de conexion
>                               //global para evitar desconexion al 
> salir de una funcion
> 
> int main(int argc, char *argv[]){
>       
>       conn=mysql_init(NULL);  //inicializa la estructura conn
> 
>       mysql_real_connect(     //establece la conexion con el server
>               conn,   //puntero al manejador de conexion
>               def_host_name,  //host al que conectar
>               def_user_name,  //nombre de usuario
>               def_password,   //password del usuario
>               def_db_name,    //base de datos a usar
>               0,                              //puerto de 
> conexion,0=usar predeterminado
>               NULL,                   //socket, usamos predeterminado
>               0);                             //modificadores, no 
> usamos ninguno
> 
>       mysql_close(conn);      //cierra la conexion apuntada por el 
> manejador de conexion
> 
>       return 0;
> }
> 
> As you can see, i'm just learning sql, and i was trying to connect from 
> C. I'm sure that error is in my_socket, that's not a class nor var of 
> program, and i've not found it anywhere, but i don't know the correct 
> word. Help me plz.
> Thanks in advance.
> 
> Pere
> 
>  ___________________________________________________________________ 
> Consigue tu e-mail gratuito TERRA.ES
>  Haz clic en http://www.terra.es/correo/
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 

-----------------------------------------------------
Mail.be, Free WebMail and Virtual Office
http://www.mail.be


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to