Re: c_func in Eu 4.1 Beta (Windows)

new topic     » goto parent     » topic index » view thread      » older message » newer message
Jerome said...

Well, I could be doing something silly here but I can't get c_func to work on 32-bit Windows for the latest Eu (the beta release and the latest tip do not work for me).

Ah...this is a calling convention problem. The dll is expecting cdecl (the default when you write C code), but the way it's imported in the code, you end up calling with stdcall (a win32 aberration). Try changing to "+sum" in the define_c_func call and it should work. You probably have the same problem in your other code.

I believe that Watcom added its own cleanup code no matter the calling convention, so it could hide this problem, but we're not building with Watcom any more.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu