-
Notifications
You must be signed in to change notification settings - Fork 54
Consider replacing extern "stdcall" fn
with extern "system" fn
where appropriate
#92
Comments
Thanks for reporting this. Currently, support for platforms other than Windows is outside the scope of this crate. The intercom crate might be a better fit for that use case at this point. That’s not to say we won’t ever support other platforms, we’re just currently trying to limit the scope to make getting the crate bootstrapped easier. We should make this more explicit in the readme. |
That's understandable. There's a lot more needed to support cross platform stuff anyway, mostly reexporting what's used from |
I'm going to close this now since this isn't currently on our roadmap, but if we end up supporting other platforms other than Windows, we will definitely make this change. |
Compiling with target error[E0570]: The ABI `"stdcall"` is not supported for the current target
--> C:\Users\bdbai\.cargo\registry\src\github.com-1ecc6299db9ec823\com-0.2.0\src\interfaces\iclass_factory.rs:12:1
|
12 | #[com_interface("00000001-0000-0000-c000-000000000046")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0570]: The ABI `"stdcall"` is not supported for the current target
--> C:\Users\bdbai\.cargo\registry\src\github.com-1ecc6299db9ec823\com-0.2.0\src\interfaces\iunknown.rs:8:1
|
8 | #[com_interface("00000000-0000-0000-C000-000000000046")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) Please consider reopening this issue because ARMv7 is still a supported platform on Windows. |
On Win32 targets
extern "system"
is the same asextern "stdcall"
, whereas on MacOS/Linux targets it's the same asextern "C"
. The reason behind this change is that there are cross platform COM APIs in the wild (eg, VST3 plugins for audio apps) that use the native calling convention, not stdcall.Another option: use a feature gate and default to
stdcall
, in case for some reason people want to use the COM paradigm with a different calling convention outside of Windows.The text was updated successfully, but these errors were encountered: