Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
January 03, 2006 Has anyone successfully used D (or even DMC) with MySQL on Windows? | ||||
---|---|---|---|---|
| ||||
There's a DBI project on dsource with a port of the mysqlclient headers; but as far as I can tell, it's only been used on Linux. The mysqlclient.lib that comes with MySQL is a MSVC6 file (it's a static COFF library, not an import lib). So it's not possible to link it. The source is available, so it should be possible to recompile with DMC. So, I've downloaded the MySQL source. But, the project file is a horrible mess, there isn't a sensible makefile. I think it would be necessary to make a makefile manually. I have VC6 installed on this machine, so I can check the settings. But it looks as though porting it would be an unpleasant experience. (and it would need to be redone with new releases of MySQL). Has anyone already done it? Or is there another alternative? |
January 03, 2006 Re: Has anyone successfully used D (or even DMC) with MySQL on Windows? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don Clugston | Don Clugston wrote:
> There's a DBI project on dsource with a port of the mysqlclient headers;
> but as far as I can tell, it's only been used on Linux.
> The mysqlclient.lib that comes with MySQL is a MSVC6 file (it's a static COFF library, not an import lib). So it's not possible to link it.
>
> The source is available, so it should be possible to recompile with DMC.
> So, I've downloaded the MySQL source. But, the project file is a horrible mess, there isn't a sensible makefile. I think it would be necessary to make a makefile manually. I have VC6 installed on this machine, so I can check the settings.
>
> But it looks as though porting it would be an unpleasant experience. (and it would need to be redone with new releases of MySQL). Has anyone already done it? Or is there another alternative?
Problem solved. For future reference:
I used the Manfred Hansen's Linux database bindings mentioned on Wiki4D, (Note: you need to change extern(C) to extern(Windows)),
then use the new coffimplib tool to create an OMF .lib for the libmySQL.dll file.
Ignore the libmyclient.lib completely.
|
January 03, 2006 Re: Has anyone successfully used D (or even DMC) with MySQL on Windows? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don Clugston | Don Clugston wrote:
> Don Clugston wrote:
>> There's a DBI project on dsource with a port of the mysqlclient headers;
>> but as far as I can tell, it's only been used on Linux.
>> The mysqlclient.lib that comes with MySQL is a MSVC6 file (it's a static
>> COFF library, not an import lib). So it's not possible to link it.
>>
>> The source is available, so it should be possible to recompile with DMC. So, I've downloaded the MySQL source. But, the project file is a horrible mess, there isn't a sensible makefile. I think it would be necessary to make a makefile manually. I have VC6 installed on this machine, so I can check the settings.
>>
>> But it looks as though porting it would be an unpleasant experience. (and it would need to be redone with new releases of MySQL). Has anyone already done it? Or is there another alternative?
>
> Problem solved. For future reference:
>
> I used the Manfred Hansen's Linux database bindings mentioned on Wiki4D,
> (Note: you need to change extern(C) to extern(Windows)),
> then use the new coffimplib tool to create an OMF .lib for the
> libmySQL.dll file.
>
> Ignore the libmyclient.lib completely.
I will make an advice on my hompage.
Thank you Don
Manfred
|
January 03, 2006 Re: Has anyone successfully used D (or even DMC) with MySQL on Windows? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don Clugston | Don Clugston <dac@nospam.com.au> wrote: >Don Clugston wrote: >> There's a DBI project on dsource with a port of the mysqlclient headers; >> but as far as I can tell, it's only been used on Linux. >> The mysqlclient.lib that comes with MySQL is a MSVC6 file (it's a static >> COFF library, not an import lib). So it's not possible to link it. >> >> The source is available, so it should be possible to recompile with DMC. So, I've downloaded the MySQL source. But, the project file is a horrible mess, there isn't a sensible makefile. I think it would be necessary to make a makefile manually. I have VC6 installed on this machine, so I can check the settings. >> >> But it looks as though porting it would be an unpleasant experience. (and it would need to be redone with new releases of MySQL). Has anyone already done it? Or is there another alternative? > >Problem solved. For future reference: > >I used the Manfred Hansen's Linux database bindings mentioned on Wiki4D, >(Note: you need to change extern(C) to extern(Windows)), >then use the new coffimplib tool to create an OMF .lib for the >libmySQL.dll file. > >Ignore the libmyclient.lib completely. Are you planning to write some kind of class wrapper for it? The C api is not very friendly to quick development. I ask, because I was just about to start writing something for a project i'm doing using manfred's interface. -S. Chancellor -- Email works. |
January 04, 2006 Re: Has anyone successfully used D (or even DMC) with MySQL on Windows? | ||||
---|---|---|---|---|
| ||||
Posted in reply to S. Chancellor | S. Chancellor wrote:
> Don Clugston <dac@nospam.com.au> wrote:
>
>>Don Clugston wrote:
>>
>>>There's a DBI project on dsource with a port of the mysqlclient headers;
>>>but as far as I can tell, it's only been used on Linux.
>>>The mysqlclient.lib that comes with MySQL is a MSVC6 file (it's a static COFF library, not an import lib). So it's not possible to link it.
>>>
>>>The source is available, so it should be possible to recompile with DMC.
>>>So, I've downloaded the MySQL source. But, the project file is a horrible mess, there isn't a sensible makefile. I think it would be necessary to make a makefile manually. I have VC6 installed on this machine, so I can check the settings.
>>>
>>>But it looks as though porting it would be an unpleasant experience. (and it would need to be redone with new releases of MySQL). Has anyone already done it? Or is there another alternative?
>>
>>Problem solved. For future reference:
>>
>>I used the Manfred Hansen's Linux database bindings mentioned on Wiki4D, (Note: you need to change extern(C) to extern(Windows)),
>>then use the new coffimplib tool to create an OMF .lib for the libmySQL.dll file.
>>
>>Ignore the libmyclient.lib completely.
>
>
> Are you planning to write some kind of class wrapper for it? The C api
> is not very friendly to quick development. I ask, because I was just
> about to start writing something for a project i'm doing using manfred's
> interface.
> -S. Chancellor
I wasn't planning on writing anything myself, but if someone else does, I'll use it :-).
The DBI project on Dsource.org was rescued from oblivion last week, and is looking for a new owner. At the very least, it might give you some ideas.
|
January 04, 2006 Re: Has anyone successfully used D (or even DMC) with MySQL on Windows? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don Clugston | Don Clugston wrote:
> There's a DBI project on dsource with a port of the mysqlclient headers;
> but as far as I can tell, it's only been used on Linux.
> The mysqlclient.lib that comes with MySQL is a MSVC6 file (it's a static COFF library, not an import lib). So it's not possible to link it.
>
> The source is available, so it should be possible to recompile with DMC.
> So, I've downloaded the MySQL source. But, the project file is a horrible mess, there isn't a sensible makefile. I think it would be necessary to make a makefile manually. I have VC6 installed on this machine, so I can check the settings.
>
> But it looks as though porting it would be an unpleasant experience. (and it would need to be redone with new releases of MySQL). Has anyone already done it? Or is there another alternative?
I think there are sqllite bindings on dprogramming.com if this can help...
|
Copyright © 1999-2021 by the D Language Foundation