<?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[&amp;quot;warning C4273: Inkonsistente DLL-Bindung&amp;quot; und &amp;quot;error LNK2019: Verweis auf nicht aufgelöstes externes Sym]]></title><description><![CDATA[<p>Hallo,<br />
Ich habe ein Problem und zwar habe ich eine DLL erstellt und dort kommt beim Compilen zwar kein Fehler aber 17 Warungen die alle &quot;warning C4273: 'MEINEFUNKTION':Inkonsistente DLL-Bindung.&quot; enthalten. Was bedeutet das?<br />
Und das wirkliche Problem (Ich glaube das hat was damit zu tun) ist, dass in meinem Projekt (in dem die DLL eingebunden ist) beim Aufrufen der Funktionen folgender Fehler kommt:</p>
<pre><code>1&gt;main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;__declspec(dllimport) public: __thiscall
DirectX::Direct_Draw::Direct_Draw(struct HWND__ *)&quot; (__imp_??0Direct_Draw@DirectX@@QAE@PAUHWND__@@@Z)&quot; in Funktion &quot;_WinMain@16&quot;.
</code></pre>
<p>Was bedeutet dieser Fehler überhaupt und wie kann ich ihn beheben?<br />
Der Quellcode sieht (stark gekürzt) so aus:<br />
Direct_Draw.h (DLL)</p>
<pre><code class="language-cpp">namespace DirectX
{
   class Direct_Draw
   {
      Direct_Draw(HWND hWnd);
   };
}
</code></pre>
<p>Direct_Draw.cpp (DLL)</p>
<pre><code class="language-cpp">#include &quot;Direct_Draw.h&quot;
DirectX::Direct_Draw::Direct_Draw(HWND hWnd)
{
   //INIT DIRECT DRAW...
}
</code></pre>
<p>Main.cpp</p>
<pre><code class="language-cpp">int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
   //INIT Window
   MyDirectDraw = new DirectX::Direct_Draw(MyWindow-&gt;Get_HWND());
}
</code></pre>
<p>MFG<br />
Neokil</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/256846/quot-warning-c4273-inkonsistente-dll-bindung-quot-und-quot-error-lnk2019-verweis-auf-nicht-aufgelöstes-externes-sym</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 03:02:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/256846.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 18 Dec 2009 16:48:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to &amp;quot;warning C4273: Inkonsistente DLL-Bindung&amp;quot; und &amp;quot;error LNK2019: Verweis auf nicht aufgelöstes externes Sym on Fri, 18 Dec 2009 16:49:22 GMT]]></title><description><![CDATA[<p>Hallo,<br />
Ich habe ein Problem und zwar habe ich eine DLL erstellt und dort kommt beim Compilen zwar kein Fehler aber 17 Warungen die alle &quot;warning C4273: 'MEINEFUNKTION':Inkonsistente DLL-Bindung.&quot; enthalten. Was bedeutet das?<br />
Und das wirkliche Problem (Ich glaube das hat was damit zu tun) ist, dass in meinem Projekt (in dem die DLL eingebunden ist) beim Aufrufen der Funktionen folgender Fehler kommt:</p>
<pre><code>1&gt;main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;__declspec(dllimport) public: __thiscall
DirectX::Direct_Draw::Direct_Draw(struct HWND__ *)&quot; (__imp_??0Direct_Draw@DirectX@@QAE@PAUHWND__@@@Z)&quot; in Funktion &quot;_WinMain@16&quot;.
</code></pre>
<p>Was bedeutet dieser Fehler überhaupt und wie kann ich ihn beheben?<br />
Der Quellcode sieht (stark gekürzt) so aus:<br />
Direct_Draw.h (DLL)</p>
<pre><code class="language-cpp">namespace DirectX
{
   class Direct_Draw
   {
      Direct_Draw(HWND hWnd);
   };
}
</code></pre>
<p>Direct_Draw.cpp (DLL)</p>
<pre><code class="language-cpp">#include &quot;Direct_Draw.h&quot;
DirectX::Direct_Draw::Direct_Draw(HWND hWnd)
{
   //INIT DIRECT DRAW...
}
</code></pre>
<p>Main.cpp</p>
<pre><code class="language-cpp">int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
   //INIT Window
   MyDirectDraw = new DirectX::Direct_Draw(MyWindow-&gt;Get_HWND());
}
</code></pre>
<p>MFG<br />
Neokil</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1824574</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1824574</guid><dc:creator><![CDATA[Neokil]]></dc:creator><pubDate>Fri, 18 Dec 2009 16:49:22 GMT</pubDate></item></channel></rss>