MySQL connection strange behavior (again...)

miazo miazo at no.spam.please
Wed Feb 22 09:02:00 PST 2012


Thank you for that suggestion but I have tried it before - 
changing extern (C) to extern (Windows) gives me a linker error:

Error 42: Symbol Undefined _mysql_init at 4

As I wrote, I have libmysql.lib in a proper DMD folder and I can 
see that _mysql_init function is defined inside. I have tried two 
versions of libmysql.lib that I could create: the one made from 
original libmysql.lib from MySQL installation converted with 
coffimplib utility, and the other one made from libmysql.dll with 
implib utility. Both versions compile if I stay with extern (C) 
instead of extern (Windows). I was wondering if this is really 
necessary? Sqlite bindings, for example, use extern (C) without 
problems. If it is, how do I get rid of that linker error?

On the other hand, I have found this bug: 
http://d.puremagic.com/issues/show_bug.cgi?id=3342 which is 
marked as FIXED. But as I read the full description linked there 
I have that feeling that this is what I observe when I work with 
MySQL database (but why it is not the case with Sqlite or 
Postgres?). Can it be verified somehow or is there some 
workaround?


More information about the Digitalmars-d-learn mailing list