mySQL II

Manos Spanoudakis manosol at hol.gr
Thu May 4 08:54:12 EEST 2000


"L.O.V.E." <mirror_92 at yahoo.com> wrote in message
news:39088AE3.B81B4CED at yahoo.com...
> exw ayto to problima, sto programa pu akolou8ei.
> To error mesg pu mu bgazei otan to kanw compile, einai oti
> i mysql den orizetai (undefined variable).
> Egw apla pira to programma apo to manual tis mySQL , to antegrapsa kai
> to etreja. (To programa einai stin 20.4.4.4 enotita)
>
> #include <stdio.h>
> #include <stdlib.h>
> int main()
> {
> MYSQL *mysql;
>
> mysql_init(&mysql);
> if (!mysql_real_connect(&mysql, "localhost", NULL, NULL, "test", 0,
> NULL, 0))
>  {
>   fprintf(stderr, "FAILED REAL CONNECT", mysql_error(&mysql));
>  }
>
> mysql_close(&mysql);
>
> return 0;
> }
>
> opio kalo pedi, 8elei na boi8isei aytes tis agies imeres......
> 8a xarw poly :)))))))))
>
Gia dokimase na kaneis linking tis vivlio8ikes pou periexoun ta .h pou opws
vlepw DEN EXEIS KANEI include !!
Ara xreiazesai ena
#include <mysql.h> kai otan kaneis compile pros8ese ta parakatw
-L/usr/lib -I/usr/include/mysql -lmysqlclient -lnsl





--
linux-greek-users mailing list -- http://lists.hellug.gr




More information about the Linux-greek-users mailing list