Sergey Gromov Wrote: > You're talking about Doryen Library project, right? > > My thought is that TCOD_console_flush is actually cdecl and must be > declared as extern(C), while you seem to declare it as extern(Windows) > which is stdcall. What you get with linkdef is corrupted stack. This > is why coffimplib is absolute best when you have the right COFF import > library: it allows to catch this sort of errors.
Hah, you got me. Yeah, I'm toying with a wrapper for Doryen Library in D. I'm trying to not talk too much about it, since I don't know if I'm skilled enough to write and implement it, nor dedicated enough to finish it. :p We'll see. All the methods were preprended by TCODLIB_API, which is a typedef to __declspec(dllexport) ( or __declspec(import) ) which I thought (according to the guide) translates as export extern(Windows) I guess I'll try externing to C instead, and try to coffimp the library again. Perhaps the "visual studio" library is a bad one to use, and I should try the "Mingw" .a file.
