<?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[Objekt aus DLL exportieren, Compilerwechsel]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich exportiere aus einer DLL ein Objekt (Visual Studio 2003):</p>
<pre><code>class __declspec( dllexport ) Objekt 
{
//...
}
</code></pre>
<p>Nun möchte ich die DLL mit einem VStudio-2010-Projekt verwenden und es knallt bei der Erzeugung des Objektes.</p>
<p>Ist das ganze compilerabhängig?<br />
Hängt es an der MFC-Version?<br />
Gibt es Wege, die DLL zu verwenden?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/285059/objekt-aus-dll-exportieren-compilerwechsel</link><generator>RSS for Node</generator><lastBuildDate>Fri, 21 Aug 2026 16:08:01 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/285059.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 13 Apr 2011 12:44:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Objekt aus DLL exportieren, Compilerwechsel on Wed, 13 Apr 2011 12:44:06 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich exportiere aus einer DLL ein Objekt (Visual Studio 2003):</p>
<pre><code>class __declspec( dllexport ) Objekt 
{
//...
}
</code></pre>
<p>Nun möchte ich die DLL mit einem VStudio-2010-Projekt verwenden und es knallt bei der Erzeugung des Objektes.</p>
<p>Ist das ganze compilerabhängig?<br />
Hängt es an der MFC-Version?<br />
Gibt es Wege, die DLL zu verwenden?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2048667</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2048667</guid><dc:creator><![CDATA[stimpy]]></dc:creator><pubDate>Wed, 13 Apr 2011 12:44:06 GMT</pubDate></item><item><title><![CDATA[Reply to Objekt aus DLL exportieren, Compilerwechsel on Wed, 13 Apr 2011 12:46:01 GMT]]></title><description><![CDATA[<p>Ja es ist compierabhängig. Einziger (mir bekannter) Weg: die Dll mit VS2010 neu kompilieren (oder auf Klassen verzichten und Funktionen nur mit <code>extern &quot;C&quot;</code> exportieren).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2048668</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2048668</guid><dc:creator><![CDATA[ipsec]]></dc:creator><pubDate>Wed, 13 Apr 2011 12:46:01 GMT</pubDate></item><item><title><![CDATA[Reply to Objekt aus DLL exportieren, Compilerwechsel on Wed, 13 Apr 2011 12:47:21 GMT]]></title><description><![CDATA[<p>stimpy schrieb:</p>
<blockquote>
<p>Ist das ganze compilerabhängig?<br />
Hängt es an der MFC-Version?<br />
Gibt es Wege, die DLL zu verwenden?</p>
</blockquote>
<p>Es gibt für C++ keine Binärkompatibilität bei den Schnittstellen, daher werden viele C++ DLLs mit einer C-Schnittstelle ausgestattet. Was genau möglich ist, und was nicht hängt also eher vom Zufall als von allen anderen ab.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2048669</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2048669</guid><dc:creator><![CDATA[asc]]></dc:creator><pubDate>Wed, 13 Apr 2011 12:47:21 GMT</pubDate></item><item><title><![CDATA[Reply to Objekt aus DLL exportieren, Compilerwechsel on Wed, 13 Apr 2011 13:35:23 GMT]]></title><description><![CDATA[<p>Danke allerseits! Ich hatte es schon vermutet.<br />
Man findet in der Doku immer was geht, aber nie was nicht geht, und warum...</p>
<p>DLL-Hölle, Hölle, Hölle! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2048704</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2048704</guid><dc:creator><![CDATA[stimpy]]></dc:creator><pubDate>Wed, 13 Apr 2011 13:35:23 GMT</pubDate></item><item><title><![CDATA[Reply to Objekt aus DLL exportieren, Compilerwechsel on Wed, 13 Apr 2011 13:46:31 GMT]]></title><description><![CDATA[<p>Was auch gehen würde:</p>
<p>1. Schnitstelle (Klasse mit nur rein virt. Funktionen) deines zu exportierenden Objekts erstellen<br />
2. Implementation dieser Schnittstelle befindet sich in der DLL<br />
3. Factory Funktion anbieten und als extern &quot;C&quot; exportieren (ev. auch Release Funktion anbieten)</p>
<p>Zur Schnittstelle sei gesagt, dass sie nur Basis Typen enthalten darf (oder weitere Zeiger / Referenzen auf Interfaces).</p>
<p>So kann eine DLL mit VS2010 erstellt gut in VC++6.0 benutzt werden.</p>
<p>Nachlesen kann man das hier:<br />
<a href="https://duckduckgo.com/?q=isbn+9780321228772&amp;cppnetbooks" rel="nofollow">Imperfect C++ | ISBN: 9780321228772</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2048708</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2048708</guid><dc:creator><![CDATA[theta]]></dc:creator><pubDate>Wed, 13 Apr 2011 13:46:31 GMT</pubDate></item><item><title><![CDATA[Reply to Objekt aus DLL exportieren, Compilerwechsel on Wed, 13 Apr 2011 15:58:07 GMT]]></title><description><![CDATA[<p>Ahh, cool, sowas in der Art will ich gerade machen!<br />
&quot;Imperfect ...&quot; das könnte 'ne neue IT-Buchreihe werden. <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>
<p>Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2048823</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2048823</guid><dc:creator><![CDATA[stimpy]]></dc:creator><pubDate>Wed, 13 Apr 2011 15:58:07 GMT</pubDate></item><item><title><![CDATA[Reply to Objekt aus DLL exportieren, Compilerwechsel on Wed, 13 Apr 2011 15:59:59 GMT]]></title><description><![CDATA[<p>Im Prinzip ist ja COM+ der offizielle Lösungsweg.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2048825</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2048825</guid><dc:creator><![CDATA[Artchi]]></dc:creator><pubDate>Wed, 13 Apr 2011 15:59:59 GMT</pubDate></item></channel></rss>