<?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[Probleme beim Fenstererstellen]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;windows.h&gt;
 HWND CreateMainWindow(HINSTANCE hInstance);
 LRESULT CALLBACK MessageHandler(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
 HWND hWnd = 0;

 int WINAPI Winmain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
 {
   hWnd = CreateMainWindow(hInstance);
   if(0 == hWnd)
   {
     MessageBox(0, &quot;Fenster konnte nicht geöffnet werden&quot;, &quot;Fehler&quot;, MB_OK);
     return 0;
   }

   MSG msg;
   while(GetMessage(&amp;msg, NULL, 0,0))
   {
     TranslateMessage(&amp;msg);
     DispatchMessage(&amp;msg);
   }
   return 0;
 }
</code></pre>
<p>_______________________________________________________________________________<br />
So, das ist erstmal mein Programm. Aber wenn ich es mit Visual Studio 2003 .NET kompilieren will, kommt folgender Fehler:</p>
<blockquote>
<p>12345 error LNK2019: Nicht aufgelöstes externes Symbol '&quot;struct HWND__ * __cdecl CreateMainWindow(struct HINSTANCE__ *)&quot; (?CreateMainWindow@@YAPAUHWND__@@PAUHINSTANCE__@@@Z)', verwiesen in Funktion '&quot;int __stdcall Winmain(struct HINSTANCE__ *,struct HINSTANCE__ *,char *,int)&quot; (?Winmain@@YGHPAUHINSTANCE__@@0PADH@Z)'<br />
12345 error LNK2019: Nicht aufgelöstes externes Symbol '_WinMain@16', verwiesen in Funktion '_WinMainCRTStartup'<br />
12345 fatal error LNK1120: 2 unaufgelöste externe Verweise</p>
</blockquote>
<p>____________________________________________________________________________</p>
<p>Bitte helft mir.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/122847/probleme-beim-fenstererstellen</link><generator>RSS for Node</generator><lastBuildDate>Mon, 06 Jul 2026 11:16:56 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/122847.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 10 Oct 2005 17:05:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Probleme beim Fenstererstellen on Mon, 10 Oct 2005 17:26:46 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;windows.h&gt;
 HWND CreateMainWindow(HINSTANCE hInstance);
 LRESULT CALLBACK MessageHandler(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
 HWND hWnd = 0;

 int WINAPI Winmain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
 {
   hWnd = CreateMainWindow(hInstance);
   if(0 == hWnd)
   {
     MessageBox(0, &quot;Fenster konnte nicht geöffnet werden&quot;, &quot;Fehler&quot;, MB_OK);
     return 0;
   }

   MSG msg;
   while(GetMessage(&amp;msg, NULL, 0,0))
   {
     TranslateMessage(&amp;msg);
     DispatchMessage(&amp;msg);
   }
   return 0;
 }
</code></pre>
<p>_______________________________________________________________________________<br />
So, das ist erstmal mein Programm. Aber wenn ich es mit Visual Studio 2003 .NET kompilieren will, kommt folgender Fehler:</p>
<blockquote>
<p>12345 error LNK2019: Nicht aufgelöstes externes Symbol '&quot;struct HWND__ * __cdecl CreateMainWindow(struct HINSTANCE__ *)&quot; (?CreateMainWindow@@YAPAUHWND__@@PAUHINSTANCE__@@@Z)', verwiesen in Funktion '&quot;int __stdcall Winmain(struct HINSTANCE__ *,struct HINSTANCE__ *,char *,int)&quot; (?Winmain@@YGHPAUHINSTANCE__@@0PADH@Z)'<br />
12345 error LNK2019: Nicht aufgelöstes externes Symbol '_WinMain@16', verwiesen in Funktion '_WinMainCRTStartup'<br />
12345 fatal error LNK1120: 2 unaufgelöste externe Verweise</p>
</blockquote>
<p>____________________________________________________________________________</p>
<p>Bitte helft mir.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/889052</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/889052</guid><dc:creator><![CDATA[Jonathan1]]></dc:creator><pubDate>Mon, 10 Oct 2005 17:26:46 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme beim Fenstererstellen on Mon, 10 Oct 2005 17:27:20 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=9713" rel="nofollow">estartu_de</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=1" rel="nofollow">MFC (Visual C++)</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=4" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/889064</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/889064</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Mon, 10 Oct 2005 17:27:20 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme beim Fenstererstellen on Mon, 10 Oct 2005 20:43:06 GMT]]></title><description><![CDATA[<p>Wo definierst du CreateMainWindow? Es muss WinMain und nicht Winmain heißen (Groß-/Kleinschreibung beachten)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/889227</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/889227</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Mon, 10 Oct 2005 20:43:06 GMT</pubDate></item></channel></rss>