Need OMF MySQL lib that actually f^*&^ works...
Nick Sabalausky
a at a.a
Sat Jul 23 00:39:05 PDT 2011
"Nick Sabalausky" <a at a.a> wrote in message
news:j0dqhg$2cvs$1 at digitalmars.com...
> "Nick Sabalausky" <a at a.a> wrote in message
> news:j0b4r1$icb$1 at digitalmars.com...
>> Anyone have a known-working Windows OMF library for MySQL? Static or
>> dynamic, I don't care. I've tried fucking everything and I can't get the
>> dang thing to work. Static was a total no-go. With dynamic, using implib
>> I got it to link, but calling any of it resulted in an Access Violation.
>> Using coffimplib, best I could do had one linker error, a missing
>> "_mysql_real_connect". This was all with "Connector/C" v6.0.2. I'd have
>> tried an older version, 5.x, but 6.0.2 is the only version that seems to
>> still exist.
>>
>
> Goddamnnit, I think the whole problem was that stupid linking with a C
> "long" issue...
>
> The function mysql_real_connect takes a long, and it's the only part of
> the MySQL interface being used that takes a long. No idea why it still
> worked on Linux, but fingers crossed that a DDMD-style C bridge will fix
> it...
>
Ok, yea, it was a C long issue with the bindings, although I ended up not
needing a C bridge. Apparently, C's "int" and "long" are both 32-bit on a
32-bit system (Also apparent: it's been a very long time since I used
C/C++...) Screwy C...
Once I changed the "ulong" param in the D binding for mysql_real_connect to
"uint", the instructions at (
http://www.wikiservice.at/d/wiki.cgi?DatabaseBindings#MySQL ) suddenly
worked like a charm. I'm now connected to my MySQL DB from D. Whoohoo!
I still have no idea why it seemed to work fine on Linux without that
change, but at the moment I don't particularly give a crap...
More information about the Digitalmars-d-learn
mailing list