<?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[Fehlermeldung bei Programm &amp;quot;einfaches Fenster&amp;quot;]]></title><description><![CDATA[<p>Hallo!<br />
Ich habe neulich mit der c-Programmierung angefangen und mir jetzt ein Tutorial zur Win32 API angesehen. Wenn ich versuche, das dort gelistete Programm zu Compilieren<br />
(Dev-C++), erhalte ich folgende Fehlermeldung: <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<p>Compiler: Default compiler<br />
Fenster.c: In function <code>WinMain': Fenster.c:69: warning: passing arg 1 of</code>CreateWindowExA' makes integer from pointer without a cast</p>
<p>gcc.exe Fenster.o -o &quot;Win32Fenster.exe&quot; -L&quot;lib&quot;</p>
<p>Fenster.o(.text+0x6e):Fenster.c: undefined reference to `GetStockObject@4'<br />
collect2: ld returned 1 exit status</p>
<p>make.exe: *** [Win32Fenster.exe] Error 1</p>
<p>Ausführung beendet</p>
<p>Hier der Quellcode des Programms:</p>
<pre><code>#include &lt;windows.h&gt;

LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);

LPCSTR lpszAppName = &quot;AppName&quot;;
LPCSTR lpszTitle   = &quot;Meine erste Applikation&quot;;

int APIENTRY WinMain(HINSTANCE hInstance,
           HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{

   HWND       hWnd;
   MSG        msg;
   WNDCLASSEX   wc;

   wc.cbSize        =  sizeof(WNDCLASSEX);
   wc.style         =  CS_HREDRAW | CS_VREDRAW;
   wc.lpfnWndProc   =  WndProc;
   wc.cbClsExtra    =  0;
   wc.cbWndExtra    =  0;
   wc.hInstance     =  hInstance;
   wc.hCursor       =  LoadCursor(NULL,IDC_ARROW);
   wc.hIcon         =  LoadIcon(NULL, IDI_APPLICATION);
   wc.hbrBackground =  (HBRUSH)GetStockObject(WHITE_BRUSH);
   wc.lpszClassName =  lpszAppName;
   wc.lpszMenuName  =  lpszAppName;
   wc.hIconSm       =  LoadIcon(NULL, IDI_APPLICATION);

   if( RegisterClassEx(&amp;wc) == 0)
      return 0;

   hWnd = CreateWindowEx(NULL,
                         lpszAppName,
                         lpszTitle,
                         WS_OVERLAPPEDWINDOW,
                         0,
                         0,
                         CW_USEDEFAULT,
                         CW_USEDEFAULT,
                         NULL,
                         NULL,
                         hInstance,
                         NULL);

   if( hWnd == NULL)
      return 0;

   ShowWindow(hWnd, iCmdShow);
   UpdateWindow(hWnd);

   while (GetMessage(&amp;msg, NULL, 0, 0) &gt; 0)
   {
      TranslateMessage(&amp;msg);
      DispatchMessage(&amp;msg);
   }
   return msg.wParam;
}

LRESULT CALLBACK WndProc(HWND hWnd, UINT umsg, WPARAM wParam, LPARAM lParam)
{
   switch (umsg)
   {
   case WM_DESTROY:
      {
         PostQuitMessage(0);
         return 0;
      }
   }
   return DefWindowProc(hWnd, umsg, wParam, lParam);
}
</code></pre>
<p>Ich wäre euch sehr dankbar, wenn ihr mir helfen könnt.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/173834/fehlermeldung-bei-programm-quot-einfaches-fenster-quot</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Jul 2026 18:31:27 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/173834.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 20 Feb 2007 11:26:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fehlermeldung bei Programm &amp;quot;einfaches Fenster&amp;quot; on Tue, 20 Feb 2007 11:26:47 GMT]]></title><description><![CDATA[<p>Hallo!<br />
Ich habe neulich mit der c-Programmierung angefangen und mir jetzt ein Tutorial zur Win32 API angesehen. Wenn ich versuche, das dort gelistete Programm zu Compilieren<br />
(Dev-C++), erhalte ich folgende Fehlermeldung: <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<p>Compiler: Default compiler<br />
Fenster.c: In function <code>WinMain': Fenster.c:69: warning: passing arg 1 of</code>CreateWindowExA' makes integer from pointer without a cast</p>
<p>gcc.exe Fenster.o -o &quot;Win32Fenster.exe&quot; -L&quot;lib&quot;</p>
<p>Fenster.o(.text+0x6e):Fenster.c: undefined reference to `GetStockObject@4'<br />
collect2: ld returned 1 exit status</p>
<p>make.exe: *** [Win32Fenster.exe] Error 1</p>
<p>Ausführung beendet</p>
<p>Hier der Quellcode des Programms:</p>
<pre><code>#include &lt;windows.h&gt;

LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);

LPCSTR lpszAppName = &quot;AppName&quot;;
LPCSTR lpszTitle   = &quot;Meine erste Applikation&quot;;

int APIENTRY WinMain(HINSTANCE hInstance,
           HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{

   HWND       hWnd;
   MSG        msg;
   WNDCLASSEX   wc;

   wc.cbSize        =  sizeof(WNDCLASSEX);
   wc.style         =  CS_HREDRAW | CS_VREDRAW;
   wc.lpfnWndProc   =  WndProc;
   wc.cbClsExtra    =  0;
   wc.cbWndExtra    =  0;
   wc.hInstance     =  hInstance;
   wc.hCursor       =  LoadCursor(NULL,IDC_ARROW);
   wc.hIcon         =  LoadIcon(NULL, IDI_APPLICATION);
   wc.hbrBackground =  (HBRUSH)GetStockObject(WHITE_BRUSH);
   wc.lpszClassName =  lpszAppName;
   wc.lpszMenuName  =  lpszAppName;
   wc.hIconSm       =  LoadIcon(NULL, IDI_APPLICATION);

   if( RegisterClassEx(&amp;wc) == 0)
      return 0;

   hWnd = CreateWindowEx(NULL,
                         lpszAppName,
                         lpszTitle,
                         WS_OVERLAPPEDWINDOW,
                         0,
                         0,
                         CW_USEDEFAULT,
                         CW_USEDEFAULT,
                         NULL,
                         NULL,
                         hInstance,
                         NULL);

   if( hWnd == NULL)
      return 0;

   ShowWindow(hWnd, iCmdShow);
   UpdateWindow(hWnd);

   while (GetMessage(&amp;msg, NULL, 0, 0) &gt; 0)
   {
      TranslateMessage(&amp;msg);
      DispatchMessage(&amp;msg);
   }
   return msg.wParam;
}

LRESULT CALLBACK WndProc(HWND hWnd, UINT umsg, WPARAM wParam, LPARAM lParam)
{
   switch (umsg)
   {
   case WM_DESTROY:
      {
         PostQuitMessage(0);
         return 0;
      }
   }
   return DefWindowProc(hWnd, umsg, wParam, lParam);
}
</code></pre>
<p>Ich wäre euch sehr dankbar, wenn ihr mir helfen könnt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1231824</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1231824</guid><dc:creator><![CDATA[BigC]]></dc:creator><pubDate>Tue, 20 Feb 2007 11:26:47 GMT</pubDate></item><item><title><![CDATA[Reply to Fehlermeldung bei Programm &amp;quot;einfaches Fenster&amp;quot; on Tue, 20 Feb 2007 11:57:12 GMT]]></title><description><![CDATA[<p>Du hast wahrscheinlich vergessen <em>gdi32.lib</em> zu linken ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1231857</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1231857</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Tue, 20 Feb 2007 11:57:12 GMT</pubDate></item><item><title><![CDATA[Reply to Fehlermeldung bei Programm &amp;quot;einfaches Fenster&amp;quot; on Tue, 20 Feb 2007 13:45:43 GMT]]></title><description><![CDATA[<p>Danke für deine Antwort.<br />
Nur weiß ich nicht wie ich das machen soll. Kann mir da jemand weiterhelfen?<br />
(Bin halt noch ein Anfänger)</p>
<p>BigC</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1231965</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1231965</guid><dc:creator><![CDATA[BigC]]></dc:creator><pubDate>Tue, 20 Feb 2007 13:45:43 GMT</pubDate></item><item><title><![CDATA[Reply to Fehlermeldung bei Programm &amp;quot;einfaches Fenster&amp;quot; on Tue, 20 Feb 2007 13:52:51 GMT]]></title><description><![CDATA[<p>BigC schrieb:</p>
<blockquote>
<pre><code class="language-cpp">...
gcc.exe Fenster.o -o &quot;Win32Fenster.exe&quot; -L&quot;lib&quot;...
</code></pre>
</blockquote>
<p>wahrscheinlich statt -L&quot;lib&quot; -L&quot;gdi32.lib&quot;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1231970</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1231970</guid><dc:creator><![CDATA[Airdamn]]></dc:creator><pubDate>Tue, 20 Feb 2007 13:52:51 GMT</pubDate></item><item><title><![CDATA[Reply to Fehlermeldung bei Programm &amp;quot;einfaches Fenster&amp;quot; on Tue, 20 Feb 2007 14:14:53 GMT]]></title><description><![CDATA[<p>Hiho,</p>
<p>ich habe auf meiner Seite ein Tutorial zu genau deinem Problem veröffentlicht <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="🙂"
    /> Zu finden unter &quot;Tutorials&quot;. Link siehe meine Signatur !</p>
<blockquote>
<p>wahrscheinlich statt -L&quot;lib&quot; -L&quot;gdi32.lib&quot;</p>
</blockquote>
<p>Das geht bei einer IDE auch viel einfacher <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>MfG mikey.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1231993</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1231993</guid><dc:creator><![CDATA[mikey]]></dc:creator><pubDate>Tue, 20 Feb 2007 14:14:53 GMT</pubDate></item><item><title><![CDATA[Reply to Fehlermeldung bei Programm &amp;quot;einfaches Fenster&amp;quot; on Tue, 20 Feb 2007 20:38:20 GMT]]></title><description><![CDATA[<p>Danke für das Tutorial. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /><br />
Alleine hätt ich das wahrscheinlich nie rausgekriegt. Das Programm funktioniert jetzt einwandfrei und ich kann mit den Tutorial fortfahren. Wenn mal wieder was nicht geht, dann weiß ich ja an wen ich mich wenden kann...</p>
<p>mfg<br />
BigC</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1232282</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1232282</guid><dc:creator><![CDATA[BigC]]></dc:creator><pubDate>Tue, 20 Feb 2007 20:38:20 GMT</pubDate></item></channel></rss>