How can I use COM ATL project in Linux?
Asked Answered
B

1

6

I've got a small C++ library which is made as ATL Project in Visual Studio. I want to make it crossplatfrom. It will be used in Windows and Linux. It will be included in my project, which uses Qt 4.x. How can I easily convert the library?

Baur answered 22/4, 2013 at 9:0 Comment(1)
I would not recommend to try something like this even if you would have nothing to do serving a long term in a prison.Freezedry
H
2

Short answer: Not easily.

Long answer: The COM technology is an exclusively Windows technology and ATL is built on top of it. That means you can not compile/run it under linux, except if you use Wine or something similar.

Here's what you can do: You can switch to XPCOM - a cross platform implementation of COM technology, implemented by the Mozilla platform. COM and XPCOM are binary compatible under Windows (but only if used from XPCOM - MS Windows COM is agnostic of Mozilla's XPCOM).

I am unsure if you would be able to compile any ATL code using XPCOM instead of COM as a base though (but I doubt it), and if you go with XPCOM, you're better off using an XPCOM GUI (using the same code that Mozilla/Firefox does), instead of Qt.

This would mean implementing your GUI using Javascript and XUL.

Hangeron answered 22/4, 2013 at 9:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.