Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using com-rs on a non-windows platform #145

Closed
stijnfrishert opened this issue Jun 20, 2020 · 2 comments
Closed

Using com-rs on a non-windows platform #145

stijnfrishert opened this issue Jun 20, 2020 · 2 comments

Comments

@stijnfrishert
Copy link

I'd very much like to use the "COM-lite" interface of another C++ library on macOS, but it seems this crate hasn't taken other OS'es into account besides Windows.

Namely, when I try to compile the IAnimal interface example given on the documentation landing page, I'm running into linking issues:

#[com::com_interface("EFF8970E-C50F-45E0-9284-291CE5A6F771")]
pub trait IAnimal: com::interfaces::IUnknown {
    unsafe fn eat(&self) -> com::sys::HRESULT;
}
  = note: ld: library not found for -lole32
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
          

error: aborting due to previous error; 1 warning emitted

I understand OLE is a big part of COM on Windows, but I'd prefer it if I could use just a subset of this crate that does just vtable generation and interfacing.

@rylev
Copy link
Contributor

rylev commented Jun 25, 2020

Hey there! While I wouldn't rule out supporting non-Windows platforms in the future, we're explicitly focusing on COM on Windows for now due to its pervasive use. Hopefully once we reach a good point with Windows support, we can revisit this question. I believe the best alternative to this crate that works on non-Windows platforms is intercom which explicitly supports non-Windows platforms.

@rylev rylev closed this as completed Jun 25, 2020
@stijnfrishert
Copy link
Author

Alright, thanks for the recommendation :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants