Thomas, > static void logGDALError(CPLErr eErrClass, int err_no, const char *msg) --> try inserting CPL_STDCALL, so : static void CPL_STDCALL logGDALError(CPLErr eErrClass, int err_no, const char *msg) Even