Don Clugston
Joined: 05 Oct 2005 Posts: 91 Location: Germany (expat Australian)
|
Posted: Thu Nov 23, 2006 8:35 am Post subject: MySQL on Windows - calling convention |
|
|
My version of the MySQL library uses extern(Windows) calling convention.
So in the imp.d file for MySQL, where it says:
Code: | version (Windows) {
pragma (lib, "libmysql.lib");
} else version (linux) {
pragma (lib, "libmysql.a");
} else version (darwin) {
pragma (lib, "libmysql.a");
} else {
static assert (0);
}
extern (C):
|
I think it should be:
Code: |
version (Windows) {
pragma (lib, "libmysql.lib");
extern (Windows):
} else version (linux) {
pragma (lib, "libmysql.a");
extern (C):
} else version (darwin) {
pragma (lib, "libmysql.a");
extern (C):
} else {
static assert (0, "Unsupported operating system");
}
|
Of course it's possible that this was based on a different version of the .lib file which *does* use the C calling convention. If not, you should fold this change in. |
|