<?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[Lässt sich nicht compilieren]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;windows.h&gt;

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

const char szAppName[] = &quot;Ein eigenes Fenster&quot;;

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrecInstance, PSTR szCmdLine, int iCmdShow)
{
	HWND hWnd;
	MSG msg;
	WNDCLASS wc;

	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 = szAppName;
	wc.lpszMenuName = NULL;
	RegisterClass(&amp;wc);

	hWnd = CreateWindow(szAppName, &quot;Titelleiste&quot;, WS_OVERLAPPEDWINDOW, 10, 10, 100, 100, NULL, NULL, hInstance, NULL);
	ShowWindow(hWnd,iCmdShow);
	UpdateWindow(hWnd);

	return 0;
}
</code></pre>
<p>Die zugehörigen Fehlermeldungen:</p>
<p>g:\Entwicklung\VisualC++\WinAPI-Lernen\main.cpp(10): warning C4101: 'msg' : unreferenced local variable<br />
WinAPI-Lernen error LNK2019: unresolved external symbol &quot;long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)&quot; (?WndProc@@YGJPAUHWND__@@IIJ@Z) referenced in function _WinMain@16<br />
WinAPI-Lernen fatal error LNK1120: 1 unresolved externals</p>
<p>Laut Tutorial muß es sich aber compilieren lassen. Ich nutze VS 7.1. Hab vlt irgenwas verstellt???</p>
<p>THX</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/97230/lässt-sich-nicht-compilieren</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Apr 2026 07:56:57 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/97230.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 08 Jan 2005 16:14:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Lässt sich nicht compilieren on Sat, 08 Jan 2005 16:14:34 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;windows.h&gt;

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

const char szAppName[] = &quot;Ein eigenes Fenster&quot;;

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrecInstance, PSTR szCmdLine, int iCmdShow)
{
	HWND hWnd;
	MSG msg;
	WNDCLASS wc;

	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 = szAppName;
	wc.lpszMenuName = NULL;
	RegisterClass(&amp;wc);

	hWnd = CreateWindow(szAppName, &quot;Titelleiste&quot;, WS_OVERLAPPEDWINDOW, 10, 10, 100, 100, NULL, NULL, hInstance, NULL);
	ShowWindow(hWnd,iCmdShow);
	UpdateWindow(hWnd);

	return 0;
}
</code></pre>
<p>Die zugehörigen Fehlermeldungen:</p>
<p>g:\Entwicklung\VisualC++\WinAPI-Lernen\main.cpp(10): warning C4101: 'msg' : unreferenced local variable<br />
WinAPI-Lernen error LNK2019: unresolved external symbol &quot;long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)&quot; (?WndProc@@YGJPAUHWND__@@IIJ@Z) referenced in function _WinMain@16<br />
WinAPI-Lernen fatal error LNK1120: 1 unresolved externals</p>
<p>Laut Tutorial muß es sich aber compilieren lassen. Ich nutze VS 7.1. Hab vlt irgenwas verstellt???</p>
<p>THX</p>
]]></description><link>https://www.c-plusplus.net/forum/post/690870</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/690870</guid><dc:creator><![CDATA[VirtualDreams]]></dc:creator><pubDate>Sat, 08 Jan 2005 16:14:34 GMT</pubDate></item><item><title><![CDATA[Reply to Lässt sich nicht compilieren on Sat, 08 Jan 2005 16:18:22 GMT]]></title><description><![CDATA[<p>die warnung kommt weil du die variable msg deklarierst aber nicht weiter benutzt.</p>
<p>die fehlermeldung kommt vielleicht weil du zwar WndProc als Prototyp, aber nicht weiter deklarierst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/690873</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/690873</guid><dc:creator><![CDATA[Herr-Vorragend]]></dc:creator><pubDate>Sat, 08 Jan 2005 16:18:22 GMT</pubDate></item><item><title><![CDATA[Reply to Lässt sich nicht compilieren on Sat, 08 Jan 2005 16:19:09 GMT]]></title><description><![CDATA[<p>s.o.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/690874</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/690874</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sat, 08 Jan 2005 16:19:09 GMT</pubDate></item><item><title><![CDATA[Reply to Lässt sich nicht compilieren on Sat, 08 Jan 2005 16:26:09 GMT]]></title><description><![CDATA[<p>Danke, da hätte der Autor des Tuts wenigstens mal ein Wort darüber verlieren können.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/690879</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/690879</guid><dc:creator><![CDATA[VirtualDreams]]></dc:creator><pubDate>Sat, 08 Jan 2005 16:26:09 GMT</pubDate></item></channel></rss>