Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use COM ATL project in Linux?

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?

like image 204
ilya Avatar asked Nov 03 '22 23:11

ilya


1 Answers

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.

like image 122
utnapistim Avatar answered Nov 05 '22 14:11

utnapistim