M
M
Mercury132015-12-30 17:08:10
C++ / C#
Mercury13, 2015-12-30 17:08:10

COM: how to port from MSVC to MinGW?

We have a certain COM library that works on headers and inlines (TLH and TLI) generated via the #import directive.
How can I connect this library to MinGW?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VZVZ, 2015-12-30
@Mercury13

> We have a certain COM library working on headers and inlines (TLH and TLI) generated via the #import directive.
Do not quite understand. You have a COM library, and you "connect" it with #import to the main application - so what?
And why do you need this Linux MinGW?
Under Windows, you also need to use Windows tools ...
Well, if necessary, then we take these .tlh and .tli, combine them into 1 header (for convenience) and long and tediously remove everything superfluous, everything that does not support MinGW, first of all, these are properties (property), which [in MinGW, of course, do not exist in this form ...
To be sure that in the end everything will work, you can start small, that is, first write a helloworld COM library with 1 simple interface, and do it all with it, and then take on the main thing.
In my case, it turned out to be much easier to do.
It was necessary to work with ADO on MinGW. I didn’t bother with #import, but first I looked at one of the forks of this compiler - MinGW-w64 - and found that it already has such headers, apparently ported either from VC ++, or from C ++ Builder, which encouraged me and I began to try them in Visual Studio.
In VS, these headers worked, after which they were relatively easily added to regular MinGW, where they also worked. Now, based on them, I am building a high-level wrapper in the ADO.NET style, the same code works both in VS and in MinGW ..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question