<?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[Microsoft Visual C++ 6 Linker Fehler]]></title><description><![CDATA[<p>Moin,<br />
ich habe folgendes Problem,<br />
ich hab gerade mit Visual C++ angefangen (vorher nur BlitzBasic) und habe jetzt<br />
ein kleines Programm geschrieben, dass ein Fenster erstellt und ein bisschen Text ausgibt.<br />
Hat auch alles schön funktioniert, aber wie gesagt, hat.<br />
Jetzt tut es das nicht mehr. Es kommt dann immer die Fehlermeldung:</p>
<pre><code class="language-cpp">--------------------Konfiguration: main - Win32 Debug--------------------
Linker-Vorgang läuft...
LIBCD.lib(crt0.obj) : error LNK2001: Nichtaufgeloestes externes Symbol _main
Debug/main.exe : fatal error LNK1120: 1 unaufgeloeste externe Verweise
Fehler beim Ausführen von link.exe.

main.exe - 2 Fehler, 0 Warnung(en)
</code></pre>
<p>Ich benutzte wie schon gesagt Visual C++ 6 in der Autorenedition aus dem Buch<br />
&quot;Jetzt lerne ich Spieleprogrammierung mit DirectX und VisualC++&quot; - von Christian Rouselle - ISBN 3-8272-5977-0<br />
Betriebssystem: Windows XP SP2</p>
<p>Wenn es was hilft, kann ich auch noch den Quellcode posten.</p>
<p>cg.Dark</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/189147/microsoft-visual-c-6-linker-fehler</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 21:24:33 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/189147.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 09 Aug 2007 08:11:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Microsoft Visual C++ 6 Linker Fehler on Thu, 09 Aug 2007 08:11:22 GMT]]></title><description><![CDATA[<p>Moin,<br />
ich habe folgendes Problem,<br />
ich hab gerade mit Visual C++ angefangen (vorher nur BlitzBasic) und habe jetzt<br />
ein kleines Programm geschrieben, dass ein Fenster erstellt und ein bisschen Text ausgibt.<br />
Hat auch alles schön funktioniert, aber wie gesagt, hat.<br />
Jetzt tut es das nicht mehr. Es kommt dann immer die Fehlermeldung:</p>
<pre><code class="language-cpp">--------------------Konfiguration: main - Win32 Debug--------------------
Linker-Vorgang läuft...
LIBCD.lib(crt0.obj) : error LNK2001: Nichtaufgeloestes externes Symbol _main
Debug/main.exe : fatal error LNK1120: 1 unaufgeloeste externe Verweise
Fehler beim Ausführen von link.exe.

main.exe - 2 Fehler, 0 Warnung(en)
</code></pre>
<p>Ich benutzte wie schon gesagt Visual C++ 6 in der Autorenedition aus dem Buch<br />
&quot;Jetzt lerne ich Spieleprogrammierung mit DirectX und VisualC++&quot; - von Christian Rouselle - ISBN 3-8272-5977-0<br />
Betriebssystem: Windows XP SP2</p>
<p>Wenn es was hilft, kann ich auch noch den Quellcode posten.</p>
<p>cg.Dark</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1341261</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1341261</guid><dc:creator><![CDATA[cg.Dark]]></dc:creator><pubDate>Thu, 09 Aug 2007 08:11:22 GMT</pubDate></item><item><title><![CDATA[Reply to Microsoft Visual C++ 6 Linker Fehler on Thu, 09 Aug 2007 08:16:34 GMT]]></title><description><![CDATA[<p>Es fehlt die main Funktion. Schau mal ob Du eine irgendwo im Source hast.</p>
<pre><code class="language-cpp">int main(int argc, char* argv[]) {
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1341266</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1341266</guid><dc:creator><![CDATA[martinsalo]]></dc:creator><pubDate>Thu, 09 Aug 2007 08:16:34 GMT</pubDate></item><item><title><![CDATA[Reply to Microsoft Visual C++ 6 Linker Fehler on Thu, 09 Aug 2007 08:19:43 GMT]]></title><description><![CDATA[<p>Also eine Main Funktion habe ich, außerdem ist es doch ein Windows Programm, deshalb:</p>
<pre><code class="language-cpp">int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
 ...
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1341268</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1341268</guid><dc:creator><![CDATA[cg.Dark]]></dc:creator><pubDate>Thu, 09 Aug 2007 08:19:43 GMT</pubDate></item><item><title><![CDATA[Reply to Microsoft Visual C++ 6 Linker Fehler on Thu, 09 Aug 2007 08:23:10 GMT]]></title><description><![CDATA[<p>Dann hast du vermutlich den falschen Projekttyp ausgewählt, als du das Projekt angelegt hast - bei einer &quot;Win32 Konsolenanwendung&quot; brauchst du eine main(), bei einer &quot;Win32 Anwendung&quot; die WinMain().</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1341272</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1341272</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Thu, 09 Aug 2007 08:23:10 GMT</pubDate></item><item><title><![CDATA[Reply to Microsoft Visual C++ 6 Linker Fehler on Thu, 09 Aug 2007 08:24:25 GMT]]></title><description><![CDATA[<p>Du hast ein KonsolenProjekt erstellt? Dort heißt der Einstiegspunkt main. Du willst vermutlich ein Win Programm erstellen (hier heißt der Einstiegspunkt WinMain). Du müsstest also ein &quot;Win32 Applikation&quot; Projekt erstellen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1341273</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1341273</guid><dc:creator><![CDATA[martinsalo]]></dc:creator><pubDate>Thu, 09 Aug 2007 08:24:25 GMT</pubDate></item><item><title><![CDATA[Reply to Microsoft Visual C++ 6 Linker Fehler on Thu, 09 Aug 2007 08:25:40 GMT]]></title><description><![CDATA[<p>k, da habe ich mich falsch ausgedrückt, es IST eine Win32 Projekt und es lief schonmal, hier jetzt doch der Quellcode:</p>
<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;

const int gfxw = 420;
const int gfxh = 335;

char wndName[] = &quot;Just a DARK Window&quot;;

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {

	hWnd = CreateMainWindow(hInstance);

	if(0 == hWnd) {
		MessageBox(0, &quot;WINDOW COULDN'T BE CREATED!&quot;, &quot;ERROR!&quot;,MB_OK);
		return 0;
	}

	MSG msg;

	while(GetMessage(&amp;msg, NULL, 0,0))
	{
		TranslateMessage(&amp;msg);
		DispatchMessage(&amp;msg);
	}

	return 0;
}

HWND CreateMainWindow(HINSTANCE hInstance)
{

	WNDCLASSEX wndClass;

	wndClass.cbSize			= sizeof(WNDCLASSEX);
	wndClass.style			= CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
	wndClass.lpfnWndProc	= MessageHandler;
	wndClass.cbClsExtra		= 0;
	wndClass.cbWndExtra		= 0;
	wndClass.hInstance		= hInstance;
	wndClass.hbrBackground	= (HBRUSH) GetStockObject(WHITE_BRUSH);
	wndClass.hCursor		= LoadCursor(NULL, IDC_ARROW);
	wndClass.lpszMenuName	= NULL;
	wndClass.lpszClassName	= &quot;WindowClass&quot;;
	wndClass.hIcon			= LoadIcon(NULL, IDI_WINLOGO);
	wndClass.hIconSm		= LoadIcon(NULL, IDI_WINLOGO);

	RegisterClassEx(&amp;wndClass);

	return CreateWindowEx(
		NULL,
		&quot;WindowClass&quot;,
		wndName,
		WS_OVERLAPPEDWINDOW | WS_VISIBLE,
		230,230,
		gfxw,gfxh,
		NULL,
		NULL,
		hInstance,
		NULL
	);
}

LRESULT CALLBACK MessageHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {

	HDC hDC;

	switch(msg) {
	case WM_DESTROY:
		PostQuitMessage(0);
		return 0;
		break;

	case WM_LBUTTONDOWN:
		int x1,y1,x2,y2;
		hDC = GetDC(hWnd);

		x1 = LOWORD(lParam);
		y1 = HIWORD(lParam);
		x2 = x1 + 50;
		y2 = y1 + 50;
		Rectangle(hDC, x1,y1,x2,y2);

		ReleaseDC(hWnd, hDC);
		return 0;
		break;

	case WM_RBUTTONDOWN:
		InvalidateRect(hWnd, 0, TRUE);
		return 0;
		break;

	case WM_MOUSEMOVE:
		int x,y;
		char mouse_coord[25];

		hDC = GetDC(hWnd);

		x = LOWORD(lParam);
		y = HIWORD(lParam);

		sprintf(mouse_coord, &quot;MOUSE COORD. : %-4d, %-4d&quot;, x,y);
		SetTextColor(hDC, RGB(x%255,y%255,23));
		TextOut(hDC, gfxw - strlen(mouse_coord)*8,23, mouse_coord, strlen(mouse_coord));

		ReleaseDC(hWnd, hDC);
		return 0;
		break;

	case WM_PAINT:
		PAINTSTRUCT ps;
		HDC hDC;

		hDC = BeginPaint(hWnd, &amp;ps);

		HPEN PenBlack = CreatePen(PS_SOLID, 1, RGB(0,0,0));

		char dark_string[] = &quot;THIS RUUUUUL3Z!&quot;;
		SelectObject(hDC, PenBlack);

		unsigned int right_end_of_the_text_box = 150;

		MoveToEx(hDC,20,20, NULL);
		LineTo(hDC, right_end_of_the_text_box, 20);

		for(short int i = 0; i &lt; 255; i+= 17)
		{
			SetTextColor(hDC, RGB(i,i,i));
			TextOut(hDC, 23,23 + i, dark_string,strlen(dark_string));
		}

		for(short int j = 0; j &lt; 255; j++)
		{
			SetPixel(hDC, 20,20+j,RGB(j,j,j));
			SetPixel(hDC, right_end_of_the_text_box, 20+j,RGB(j,j,j));
		}

		DeleteObject(PenBlack);
		EndPaint(hWnd, &amp;ps);

		return 0;
	}
	return (DefWindowProc(hWnd, msg, wParam, lParam));
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1341275</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1341275</guid><dc:creator><![CDATA[cg.Dark]]></dc:creator><pubDate>Thu, 09 Aug 2007 08:25:40 GMT</pubDate></item><item><title><![CDATA[Reply to Microsoft Visual C++ 6 Linker Fehler on Thu, 09 Aug 2007 08:29:37 GMT]]></title><description><![CDATA[<p>Ja, aber Du hast dem Kompiler gesagt das dieser Source ein Konsolenprojekt darstellen soll. Deshalb sucht dieser nach main. Du mußt ihm sagen das es ein Windows Projekt ist. Dann sucht er nach WinMain... und findet es. Am besten Du machst ein neues Projekt und wählst Win32 Applikation aus. Den Source dann da einfügen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1341278</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1341278</guid><dc:creator><![CDATA[martinsalo]]></dc:creator><pubDate>Thu, 09 Aug 2007 08:29:37 GMT</pubDate></item><item><title><![CDATA[Reply to Microsoft Visual C++ 6 Linker Fehler on Thu, 09 Aug 2007 08:34:41 GMT]]></title><description><![CDATA[<p>Nee, sorry, aber ich hab dem schon gesagt dass es eine Win32 Anwendung sein soll (un KEINE Konsolenanwendung) - daran liegt's also nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1341283</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1341283</guid><dc:creator><![CDATA[cg.Dark]]></dc:creator><pubDate>Thu, 09 Aug 2007 08:34:41 GMT</pubDate></item><item><title><![CDATA[Reply to Microsoft Visual C++ 6 Linker Fehler on Thu, 09 Aug 2007 08:40:31 GMT]]></title><description><![CDATA[<p>Hm, wie hast Du es ihm gesagt?</p>
<p>EDIT: Benutzt Du Visual Studio 6 oder <a href="http://VS.Net" rel="nofollow">VS.Net</a>?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1341285</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1341285</guid><dc:creator><![CDATA[martinsalo]]></dc:creator><pubDate>Thu, 09 Aug 2007 08:40:31 GMT</pubDate></item><item><title><![CDATA[Reply to Microsoft Visual C++ 6 Linker Fehler on Thu, 09 Aug 2007 08:48:40 GMT]]></title><description><![CDATA[<p>Hey, ein bisschen mehr Fantasie bitte <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>P.S.: Falls die Frage, wieder aller Ahnungen ernst gemeint war:<br />
Datei-&gt;Neu-&gt;Projekt-&gt;Win32 Anwendung-&gt;*NAME EINGEBEN*-&gt;Leeres Projekt<br />
Datei-&gt;Neu-&gt;Datei-&gt;C++-Quellcodedatei-&gt;*NAME EINGEBEN* -&gt; Fertig!</p>
<p>P.P.S.: Vom gefühl her würde ich sagen Visual Studio 6, aber ich weis es nicht wirklich. (Wo krieg ich das raus?)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1341293</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1341293</guid><dc:creator><![CDATA[cg.Dark]]></dc:creator><pubDate>Thu, 09 Aug 2007 08:48:40 GMT</pubDate></item><item><title><![CDATA[Reply to Microsoft Visual C++ 6 Linker Fehler on Thu, 09 Aug 2007 08:51:25 GMT]]></title><description><![CDATA[<p>Einfach in der Menüleiste aufs Fragezeichen Klicken und dann &quot;Über&quot; auswählen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1341302</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1341302</guid><dc:creator><![CDATA[Chris++ 0]]></dc:creator><pubDate>Thu, 09 Aug 2007 08:51:25 GMT</pubDate></item><item><title><![CDATA[Reply to Microsoft Visual C++ 6 Linker Fehler on Thu, 09 Aug 2007 08:52:17 GMT]]></title><description><![CDATA[<p>Wenn ich es so mache wie Du beschrieben hast (es fehlt noch ein #include &quot;stdio.h&quot;) dann erhalte ich ein Fenster mit dem Farbverlauftext und der Mausposition.</p>
<p>Jetzt lasse ich mal meine Fantasie spielen: Du hast Win32 Console-Applikation bei der Projekt Erstellung ausgewählt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1341303</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1341303</guid><dc:creator><![CDATA[martinsalo]]></dc:creator><pubDate>Thu, 09 Aug 2007 08:52:17 GMT</pubDate></item></channel></rss>