Try this:implib /s libmysql.lib libmysql.dllThen change extern(Windows) to extern(C).(That's how I usually have it set up)