FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MySQL on Windows - calling convention

 
Post new topic   Reply to topic     Forum Index -> DDBI
View previous topic :: View next topic  
Author Message
Don Clugston



Joined: 05 Oct 2005
Posts: 91
Location: Germany (expat Australian)

PostPosted: Thu Nov 23, 2006 8:35 am    Post subject: MySQL on Windows - calling convention Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DDBI All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group