<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[IID_IUnknown mit MinGw]]></title><description><![CDATA[<p>Hi,</p>
<p>gerade versuche ich eine COM DLL zu erstellen.<br />
Leider bekomme ich den Linkerfehler<br />
D:\COM_dll_MinGw\01_Build/../02_Workspace/i_class.cpp:23: undefined reference to `IID_IUnknown'</p>
<p>Ich linke gegen libuuid.a:<br />
$(CC) $(LDFLAGS_DEBUG) -shared -o $(RPATH_OUT)\class_dll.dll $(RPATH_OBJ)\class.o (RPATH\_OBJ)\\i\_class.o -L(PATTH_LIB)\ -luuid -D EXPORT_DLL</p>
<p>CC ist g++</p>
<p>Das symbol wird in i_class.cpp verwendet. Aus i_class.cpp wird i_class.o gebaut.</p>
<pre><code>HRESULT STDMETHODCALLTYPE i_class::QueryInterface(const IID&amp; refiid_GUID,void **ppv)
{
    HRESULT HR_RetVal=0x00000000;
   // Check if the GUID matches i_class
   // VTable's GUID. Remember that we gave the
   // C variable name IID_IExample to our
   // VTable GUID. We can use an OLE function called
   // IsEqualIID to do the comparison for us.
   if (!IsEqualIID(refiid_GUID, CLASS_ID_I_CLASS)&amp;&amp;
        !IsEqualIID(refiid_GUID, IID_IUnknown))
   {

....
</code></pre>
<p>Woran kann denn das liegen. ??<br />
Ein nm libuuid.a ergibt:</p>
<blockquote>
<p>unknwn-uuid.o:<br />
00000000 b .bss<br />
00000000 d .data<br />
00000000 N .debug_abbrev<br />
00000000 N .debug_aranges<br />
00000000 N .debug_info<br />
00000000 N .debug_line<br />
00000000 r .rdata<br />
00000000 r .rdata$zzz<br />
00000000 t .text<br />
00000000 R _IID_IClassFactory<br />
00000010 R _IID_IUnknown</p>
</blockquote>
<p>und ein nm i_class.o ergibt:</p>
<blockquote>
<p>AUX scnlen 0x78 nreloc 3 nlnno 0<br />
[ 45](sec 5)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 _CLASS_ID_I_CLASS<br />
[ 46](sec 6)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 __ZTV7i_class<br />
[ 47](sec 7)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 __ZTI7i_class<br />
[ 48](sec 8)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 __ZTS7i_class<br />
[ 49](sec 10)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 __ZTI8IUnknown<br />
[ 50](sec 9)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 __ZTS8IUnknown<br />
[ 51](sec 0)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 _IID_IUnknown</p>
</blockquote>
<p>Würde mich über Hilfe freuen.</p>
<p>Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/322612/iid_iunknown-mit-mingw</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 01:50:42 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/322612.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 31 Dec 2013 12:25:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to IID_IUnknown mit MinGw on Tue, 31 Dec 2013 12:28:23 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>gerade versuche ich eine COM DLL zu erstellen.<br />
Leider bekomme ich den Linkerfehler<br />
D:\COM_dll_MinGw\01_Build/../02_Workspace/i_class.cpp:23: undefined reference to `IID_IUnknown'</p>
<p>Ich linke gegen libuuid.a:<br />
$(CC) $(LDFLAGS_DEBUG) -shared -o $(RPATH_OUT)\class_dll.dll $(RPATH_OBJ)\class.o (RPATH\_OBJ)\\i\_class.o -L(PATTH_LIB)\ -luuid -D EXPORT_DLL</p>
<p>CC ist g++</p>
<p>Das symbol wird in i_class.cpp verwendet. Aus i_class.cpp wird i_class.o gebaut.</p>
<pre><code>HRESULT STDMETHODCALLTYPE i_class::QueryInterface(const IID&amp; refiid_GUID,void **ppv)
{
    HRESULT HR_RetVal=0x00000000;
   // Check if the GUID matches i_class
   // VTable's GUID. Remember that we gave the
   // C variable name IID_IExample to our
   // VTable GUID. We can use an OLE function called
   // IsEqualIID to do the comparison for us.
   if (!IsEqualIID(refiid_GUID, CLASS_ID_I_CLASS)&amp;&amp;
        !IsEqualIID(refiid_GUID, IID_IUnknown))
   {

....
</code></pre>
<p>Woran kann denn das liegen. ??<br />
Ein nm libuuid.a ergibt:</p>
<blockquote>
<p>unknwn-uuid.o:<br />
00000000 b .bss<br />
00000000 d .data<br />
00000000 N .debug_abbrev<br />
00000000 N .debug_aranges<br />
00000000 N .debug_info<br />
00000000 N .debug_line<br />
00000000 r .rdata<br />
00000000 r .rdata$zzz<br />
00000000 t .text<br />
00000000 R _IID_IClassFactory<br />
00000010 R _IID_IUnknown</p>
</blockquote>
<p>und ein nm i_class.o ergibt:</p>
<blockquote>
<p>AUX scnlen 0x78 nreloc 3 nlnno 0<br />
[ 45](sec 5)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 _CLASS_ID_I_CLASS<br />
[ 46](sec 6)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 __ZTV7i_class<br />
[ 47](sec 7)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 __ZTI7i_class<br />
[ 48](sec 8)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 __ZTS7i_class<br />
[ 49](sec 10)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 __ZTI8IUnknown<br />
[ 50](sec 9)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 __ZTS8IUnknown<br />
[ 51](sec 0)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 _IID_IUnknown</p>
</blockquote>
<p>Würde mich über Hilfe freuen.</p>
<p>Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2374268</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2374268</guid><dc:creator><![CDATA[NasenBaer_2013]]></dc:creator><pubDate>Tue, 31 Dec 2013 12:28:23 GMT</pubDate></item><item><title><![CDATA[Reply to IID_IUnknown mit MinGw on Tue, 31 Dec 2013 12:48:22 GMT]]></title><description><![CDATA[<p>Okay, ich bin einen Schritt weiter glaube ich.<br />
00000010 R _IID_IUnknown<br />
bedeutet laut nm doku:<br />
R External read-only data<br />
Also vermute ich, das ich die falsche lib eingebunden habe.<br />
Welche ist denn dann die richtige ??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2374273</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2374273</guid><dc:creator><![CDATA[NasenBaer_2013]]></dc:creator><pubDate>Tue, 31 Dec 2013 12:48:22 GMT</pubDate></item><item><title><![CDATA[Reply to IID_IUnknown mit MinGw on Tue, 31 Dec 2013 12:58:42 GMT]]></title><description><![CDATA[<p>Okay, ich habs,<br />
man muss genau in dieser Reihenfolge gegen die beiden LIbs ole32 und uuid linken<br />
$(CC) $(LDFLAGS_DEBUG) -shared -o $(RPATH_OUT)\class_dll.dll $(RPATH_OBJ)\class.o (RPATH\_OBJ)\\i\_class.o -L(PATTH_LIB)\ -lole32 -luuid -D EXPORT_DLL</p>
<p>Gruß und Danke,<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title="=)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2374279</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2374279</guid><dc:creator><![CDATA[NasenBaer_2013]]></dc:creator><pubDate>Tue, 31 Dec 2013 12:58:42 GMT</pubDate></item></channel></rss>