<div dir="auto">Hi Björn, <div dir="auto"><br></div><div dir="auto">It's been a decade or two since I used #import, so I could be misremembering, but here's an idea: </div><div dir="auto"><br></div><div dir="auto">#import of x.tlb generates two files: x.tlh and x.tli. They are (heavily VC-specific) C++ sources.</div><div dir="auto"><br></div><div dir="auto">If you can get your VC build to generate those, and #include the tlh and compile the tli as a source file in your Clang build, I think Clang supports enough language features for it to work. </div><div dir="auto"><br></div><div dir="auto">Fingers crossed, </div><div dir="auto">- Kim </div></div><div class="gmail_extra"><br><div class="gmail_quote">Den 23 mars 2018 11:42 fm skrev "via cfe-dev" <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>>:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font size="2" face="sans-serif">Hello everyone,</font>
<br>
<br><font size="2" face="sans-serif">currently I'm converting some old visual
studio projects for the use with the clang compiler. Everything was fine,
until I hit the following line:</font>
<table width="100%" style="border-collapse:collapse">
<tr valign="top" height="8">
<td width="100%" style="border-style:solid solid solid solid;border-color:#000000;border-width:1px 1px 1px 1px;padding:0px 0px"><font size="1" color="#808080" face="}">#import</font><font size="1" face="}">
</font><font size="1" color="#a11f12" face="}"><file.tlb></font><font size="1" face="}">
rename(</font><font size="1" color="#a11f12" face="}">"SendMessage"</font><font size="1" face="}">,
</font><font size="1" color="#a11f12" face="}">"SendMessage"</font><font size="1" face="}">)</font></td></tr></table>
<br>
<br><font size="2" face="sans-serif">Clang stop the work and complained:</font>
<table width="100%" style="border-collapse:collapse">
<tr valign="top" height="8">
<td width="100%" style="border-style:solid solid solid solid;border-color:#000000;border-width:1px 1px 1px 1px;padding:0px 0px"><font size="1" face="}">error
: #import of type library is an unsupported Microsoft feature</font></td></tr></table>
<br>
<br><font size="2" face="sans-serif">I get it - this doesn't work, but is
there no workaround or another solution for this problem?</font>
<br>
<br><font size="2" face="sans-serif">Kind regards</font>
<br><font size="2" face="sans-serif">Björn</font>
<br><font size="2" face="sans-serif"><br>
Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr.
DE 114 165 789<br>
Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode, Heiko
Lampert, Hiroshi Kawamura, Takashi Nagano, Takeshi Fukushima.<br>
<br>
</font>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" rel="noreferrer">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>