seltsames linker problem c++ 2005 express und SDL
-
hi, ich hab im linker das lib verzeichniss von SDL eingetragen, bekomme aber wenn ich die SDL funktionen benutze unaufgelößte externe verweise. wenn ich sdl libs manuell als ressourcen eintrage, (SDL und SDLmain) dann startet das programm, aber hinter dem sdl fenster bleibt das konsolenfenster offen.
helft mir bitte, danke
-
Aha und deine Frage ist?
-
oO
was muss ich in den einstellungen von vc++2005 express ändern, damit sdl ordentlich gelinkt wird?
-
Du auch das ist mein Problem und ich hab auch
bei Bibliotheken:
/6.0/lib
bei Includes:
/6.0/IncludesDer LNK FEHLER:
>HelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__DispatchMessageA@4" in Funktion "_WinMain@16". 1>HelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__TranslateMessage@4" in Funktion "_WinMain@16". 1>HelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__GetMessageA@16" in Funktion "_WinMain@16". 1>HelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__RegisterClassExA@4" in Funktion ""unsigned short __cdecl MyRegisterClass(struct HINSTANCE__ *)" (?MyRegisterClass@@YAGPAUHINSTANCE__@@@Z)". 1>HelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__GetStockObject@4" in Funktion ""unsigned short __cdecl MyRegisterClass(struct HINSTANCE__ *)" (?MyRegisterClass@@YAGPAUHINSTANCE__@@@Z)". 1>HelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__LoadCursorA@8" in Funktion ""unsigned short __cdecl MyRegisterClass(struct HINSTANCE__ *)" (?MyRegisterClass@@YAGPAUHINSTANCE__@@@Z)". 1>HelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__LoadIconA@8" in Funktion ""unsigned short __cdecl MyRegisterClass(struct HINSTANCE__ *)" (?MyRegisterClass@@YAGPAUHINSTANCE__@@@Z)". 1>HelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__UpdateWindow@4" in Funktion ""int __cdecl InitInstance(struct HINSTANCE__ *,int)" (?InitInstance@@YAHPAUHINSTANCE__@@H@Z)". 1>HelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__ShowWindow@8" in Funktion ""int __cdecl InitInstance(struct HINSTANCE__ *,int)" (?InitInstance@@YAHPAUHINSTANCE__@@H@Z)". 1>HelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__CreateWindowExA@48" in Funktion ""int __cdecl InitInstance(struct HINSTANCE__ *,int)" (?InitInstance@@YAHPAUHINSTANCE__@@H@Z)". 1>HelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__DefWindowProcA@16" in Funktion ""long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)". 1>HelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__PostQuitMessage@4" in Funktion ""long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)". 1>HelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__EndPaint@8" in Funktion ""long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)". 1>HelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__DrawTextA@20" in Funktion ""long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)". 1>HelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__GetClientRect@8" in Funktion ""long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)". 1>HelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__BeginPaint@8" in Funktion ""long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)". 1>..\bin\HelloWorld.exe : fatal error LNK1120: 16 nicht aufgelöste externe Verweise.
-
wenn ich sdl libs manuell als ressourcen eintrage, (SDL und SDLmain) dann startet das programm, aber hinter dem sdl fenster bleibt das konsolenfenster offen.
oO
was muss ich in den einstellungen von vc++2005 express ändern, damit sdl ordentlich gelinkt wird?Wenn das Programm laeuft war das Linken erfolgreich.
@C-Chris: user32.lib dazu linken
-
-
Vertexwahn schrieb:
http://www.c-plusplus.net/forum/viewtopic-var-t-is-143003.html
ich weis, wie man den sdk integriert.
leute es kann doch nicht sein, dass man lib dateien in den resourcen-ordner hinzufügen muss, damit der linker die libs findet, die sich in einem ordner befinden, der in der lib-verzeichnissliste eingetragen ist?! des weiteren starten sdl anwendungen normalerweise IMMER ohne eingabeaufforderung im hintergrund.
-
leute es kann doch nicht sein, dass man lib dateien in den resourcen-ordner hinzufügen muss, damit der linker die libs findet, die sich in einem ordner befinden, der in der lib-verzeichnissliste eingetragen ist?!
Musst du doch nicht. Wetter hier nicht rum, wenn du nicht mit deiner IDE umgehen kannst. Wenn du ne Frage dazu hast, dann geh ins IDE-Forum und stell eine FRAGE.
Aber zum Thema: Du kannst VS 2005 Libraries auf viele Arten bekannt machen, mach es doch so wie du es immer machst oder arbeitest du das erste mal damit?
Ich nutze immer Eigenschaften-Manager->Debug/Release->Linker->Befehlszeile. Da kannst du auch mit "LIBPATH:" einen neuen Suchpfad fuer Libs hinzufuegen.des weiteren starten sdl anwendungen normalerweise IMMER ohne eingabeaufforderung im hintergrund.
Wenn ich SDL-Anwendungen habe, nutzen die Subsystem console, haben also eine main-Funktion und eine Eingabeaufforderung oeffnet sich beim Starten mit. Das ist schon alleine deswegen sinnvoll, weil das plattformunanhaengig ist.
Allerdings ist es moeglich die WinMain-Funktion als Einstiegspunkt zu nutzen. Dazu habe ich hier schonmal was geschrieben.
-
sry das war ned gegen euch. ich arbeite das erste mal mit 2005 express.
die libpfade hab ich so eingestellt:
extras->optionen->projekte und projektmappen->VC++ Verzeichnisse->Bibliotheksdateienund da den pfad von SLD/lib eingefügt.
und jetzt verstehe ich nicht warum das nicht funktioniert! Ich möchte das problem aber nicht umgehen, jedenfalls nicht, wenn ich nichtmal weis warum es so nicht klappt. kannste mir da vielleicht noch nen tipp geben warum das so nicht funktioniert?
danke
-
ich hab grad gesehen, dass die main funktion bei verwendung von sdl auch main und nicht _tmain heißen darf. jetzt sehen die fehler folgendermaßen aus:
1>main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_SDL_Quit" in Funktion "_SDL_main".
1>main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_SDL_FreeSurface" in Funktion "_SDL_main".
1>main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_SDL_PollEvent" in Funktion "_SDL_main".
1>main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_SDL_Flip" in Funktion "_SDL_main".
1>main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_SDL_SetVideoMode" in Funktion "_SDL_main".
1>main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_SDL_Init" in Funktion "_SDL_main".
-
oh man ich habs, danke für die mühe.
-
Danke wie bist du auf >user32.lib< gekommen? Das stand doch nicht irgendwo da oder? Wie linke ich die den am geschicktesten dazu?
-
Weis jemand wieso hier die Konvertierung nicht möglich ist und wie ich das beheben könnte?
Standard Hallo Welt bei Win API:
#include "Lkhr.h" //sozusagen mein Persönliches "stdafx.h" #define MAX_LOADSTRING 100 // Global Variables: HINSTANCE hInst; // current instance char szTitle[] = "Hallo Welt!"; // The title bar text char szWindowClass[] = "Hallo Welt!"; // The title bar text // Foward declarations of functions included in this code module: ATOM MyRegisterClass(HINSTANCE hInstance); BOOL InitInstance(HINSTANCE, int); LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM); int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // TODO: Place code here. MSG msg; // Initialize global strings MyRegisterClass(hInstance); // Perform application initialization: if (!InitInstance (hInstance, nCmdShow)) { return FALSE; } // Main message loop: while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } return msg.wParam; } // // FUNCTION: MyRegisterClass() // // PURPOSE: Registers the window class. // // COMMENTS: // // This function and its usage is only necessary if you want this code // to be compatible with Win32 systems prior to the 'RegisterClassEx' // function that was added to Windows 95. It is important to call this function // so that the application will get 'well formed' small icons associated // with it. // ATOM MyRegisterClass(HINSTANCE hInstance) { WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = (WNDPROC)WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = hInstance; wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_APPLICATION); wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); wcex.lpszMenuName = NULL; wcex.lpszClassName = szWindowClass; wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_APPLICATION); return RegisterClassEx(&wcex); } // // FUNCTION: InitInstance(HANDLE, int) // // PURPOSE: Saves instance handle and creates main window // // COMMENTS: // // In this function, we save the instance handle in a global variable and // create and display the main program window. // BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) { HWND hWnd; hInst = hInstance; // Store instance handle in our global variable hWnd = CreateWindow( szWindowClass, // Name of the window class to use for this window // we registered in MyRegisterClass szTitle, // Title of the application WS_OVERLAPPEDWINDOW, // Window style that Windows should make our window with // (this is the 'default' window style for windowed apps) 20, // Starting X of the window 20, // Starting Y of the window 640, // Width of the window 480, // Height of the window NULL, // Handle of our parent window (Null, since we have none) NULL, // Handle to our menu (Null, since we don't have one) hInstance, // Instance of our running application NULL); // Pointer to window-creation data (we provide none) if (!hWnd) { return FALSE; } ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); return TRUE; } // // FUNCTION: WndProc(HWND, unsigned, WORD, LONG) // // PURPOSE: Processes messages for the main window. // // WM_PAINT - Paint the main window // WM_DESTROY - post a quit message and return // // LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { PAINTSTRUCT ps; HDC hdc; char szHello[] = "Hallo, liebe Leser!"; switch (message) { case WM_PAINT: hdc = BeginPaint(hWnd, &ps); // TODO: Add any drawing code here... RECT rt; GetClientRect(hWnd, &rt); DrawText(hdc, szHello, strlen(szHello), &rt, DT_CENTER | DT_VCENTER | DT_SINGLELINE ); EndPaint(hWnd, &ps); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } return 0; }
So und hier der Fehler:
1>------ Erstellen gestartet: Projekt: Win32_HALLO_WELT, Konfiguration: Debug Win32 ------
1>Kompilieren...
1>MainHelloWorld.cpp
1>.\MainHelloWorld.cpp(74) : error C2440: '=': 'char [12]' kann nicht in 'LPCWSTR' konvertiert werden
1> Die Typen, auf die verwiesen wird, sind nicht verknüpft; die Konvertierung erfordert einen reinterpret_cast-Operator oder eine Typumwandlung im C- oder Funktionsformat.
1>.\MainHelloWorld.cpp(109) : error C2664: 'CreateWindowExW': Konvertierung des Parameters 2 von 'char [12]' in 'LPCWSTR' nicht möglich
1> Die Typen, auf die verwiesen wird, sind nicht verknüpft; die Konvertierung erfordert einen reinterpret_cast-Operator oder eine Typumwandlung im C- oder Funktionsformat.
1>.\MainHelloWorld.cpp(144) : error C2664: 'DrawText': Konvertierung des Parameters 2 von 'char [20]' in 'LPCTSTR' nicht möglich
1> Die Typen, auf die verwiesen wird, sind nicht verknüpft; die Konvertierung erfordert einen reinterpret_cast-Operator oder eine Typumwandlung im C- oder Funktionsformat.
1>Das Buildprotokoll wurde unter "file://c:\Dokumente und Einstellungen\GliderBugFix\Eigene Dateien\Visual Studio 2005\Projects\WinAPI\Win32_HALLO_WELT\Debug\BuildLog.htm" gespeichert.
1>Win32_HALLO_WELT - 3 Fehler, 0 Warnung(en)
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========Ich weis nicht wie ich in einer solche Situation einen reinterpret_cast anwenden soll...Danke
-
So dolle Sache hab mich schon total gefreut weil ich alles mit reintpret_casts irgendwie hingebogen habe:
#include "Lkhr.h" #define MAX_LOADSTRING 100 // Global Variables: HINSTANCE hInst; // current instance LPCWSTR szTitle = reinterpret_cast<LPCWSTR>("Hallo Welt!"); LPCWSTR szWindowClass = reinterpret_cast<LPCWSTR>("Hallo Welt!"); // Foward declarations of functions included in this code module: ATOM MyRegisterClass(HINSTANCE hInstance); BOOL InitInstance(HINSTANCE, int); LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM); int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // TODO: Place code here. MSG msg; // Initialize global strings MyRegisterClass(hInstance); // Perform application initialization: if (!InitInstance (hInstance, nCmdShow)) { return FALSE; } // Main message loop: while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } return msg.wParam; } // // FUNCTION: MyRegisterClass() // // PURPOSE: Registers the window class. // // COMMENTS: // // This function and its usage is only necessary if you want this code // to be compatible with Win32 systems prior to the 'RegisterClassEx' // function that was added to Windows 95. It is important to call this function // so that the application will get 'well formed' small icons associated // with it. // ATOM MyRegisterClass(HINSTANCE hInstance) { WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = (WNDPROC)WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = hInstance; wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_APPLICATION); wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); wcex.lpszMenuName = NULL; wcex.lpszClassName = szWindowClass; wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_APPLICATION); return RegisterClassEx(&wcex); } // // FUNCTION: InitInstance(HANDLE, int) // // PURPOSE: Saves instance handle and creates main window // // COMMENTS: // // In this function, we save the instance handle in a global variable and // create and display the main program window. // BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) { HWND hWnd; hInst = hInstance; // Store instance handle in our global variable hWnd = CreateWindow( szWindowClass, // Name of the window class to use for this window // we registered in MyRegisterClass szTitle, // Title of the application WS_OVERLAPPEDWINDOW, // Window style that Windows should make our window with // (this is the 'default' window style for windowed apps) 20, // Starting X of the window 20, // Starting Y of the window 640, // Width of the window 480, // Height of the window NULL, // Handle of our parent window (Null, since we have none) NULL, // Handle to our menu (Null, since we don't have one) hInstance, // Instance of our running application NULL); // Pointer to window-creation data (we provide none) if (!hWnd) { return FALSE; } ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); return TRUE; } // // FUNCTION: WndProc(HWND, unsigned, WORD, LONG) // // PURPOSE: Processes messages for the main window. // // WM_PAINT - Paint the main window // WM_DESTROY - post a quit message and return // // LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { PAINTSTRUCT ps; HDC hdc; LPCWSTR szHello = reinterpret_cast<LPCWSTR>("Hallo, liebe Leser!"); switch (message) { case WM_PAINT: hdc = BeginPaint(hWnd, &ps); // TODO: Add any drawing code here... RECT rt; GetClientRect(hWnd, &rt); DrawText(hdc, szHello, reinterpret_cast<int>(szHello), &rt, DT_CENTER | DT_VCENTER | DT_SINGLELINE ); EndPaint(hWnd, &ps); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } return 0; }
Naja zu früh gefreut!
Ich zitiere(nehme lieber den CodeTag!):
1>------ Erstellen gestartet: Projekt: Win32_HALLO_WELT, Konfiguration: Debug Win32 ------ 1>Kompilieren... 1>MainHelloWorld.cpp 1>Verknüpfen... 1>MainHelloWorld.obj : error LNK2028: Nicht aufgelöstes Token (0A00001A) ""extern "C" int __stdcall EndPaint(struct HWND__ *,struct tagPAINTSTRUCT const *)" (?EndPaint@@$$J18YGHPAUHWND__@@PBUtagPAINTSTRUCT@@@Z)", auf das in Funktion ""long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@$$FYGJPAUHWND__@@IIJ@Z)" verwiesen wird. 1>MainHelloWorld.obj : error LNK2028: Nicht aufgelöstes Token (0A000020) ""extern "C" int __stdcall GetMessageW(struct tagMSG *,struct HWND__ *,unsigned int,unsigned int)" (?GetMessageW@@$$J216YGHPAUtagMSG@@PAUHWND__@@II@Z)", auf das in Funktion ""extern "C" int __cdecl GetMessage(struct tagMSG *,struct HWND__ *,unsigned int,unsigned int)" (?GetMessage@@$$J0YAHPAUtagMSG@@PAUHWND__@@II@Z)" verwiesen wird. 1>MainHelloWorld.obj : error LNK2028: Nicht aufgelöstes Token (0A000022) ""extern "C" void __stdcall PostQuitMessage(int)" (?PostQuitMessage@@$$J14YGXH@Z)", auf das in Funktion ""long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@$$FYGJPAUHWND__@@IIJ@Z)" verwiesen wird. 1>MainHelloWorld.obj : error LNK2028: Nicht aufgelöstes Token (0A000026) ""extern "C" int __stdcall DrawTextW(struct HDC__ *,wchar_t const *,int,struct tagRECT *,unsigned int)" (?DrawTextW@@$$J220YGHPAUHDC__@@PB_WHPAUtagRECT@@I@Z)", auf das in Funktion ""extern "C" int __cdecl DrawText(struct HDC__ *,wchar_t const *,int,struct tagRECT *,unsigned int)" (?DrawText@@$$J0YAHPAUHDC__@@PB_WHPAUtagRECT@@I@Z)" verwiesen wird. 1>MainHelloWorld.obj : error LNK2028: Nicht aufgelöstes Token (0A00002C) ""extern "C" struct HICON__ * __stdcall LoadCursorW(struct HINSTANCE__ *,wchar_t const *)" (?LoadCursorW@@$$J18YGPAUHICON__@@PAUHINSTANCE__@@PB_W@Z)", auf das in Funktion ""unsigned short __cdecl MyRegisterClass(struct HINSTANCE__ *)" (?MyRegisterClass@@$$FYAGPAUHINSTANCE__@@@Z)" verwiesen wird. 1>MainHelloWorld.obj : error LNK2028: Nicht aufgelöstes Token (0A000031) ""extern "C" int __stdcall GetClientRect(struct HWND__ *,struct tagRECT *)" (?GetClientRect@@$$J18YGHPAUHWND__@@PAUtagRECT@@@Z)", auf das in Funktion ""long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@$$FYGJPAUHWND__@@IIJ@Z)" verwiesen wird. 1>MainHelloWorld.obj : error LNK2028: Nicht aufgelöstes Token (0A000032) ""extern "C" struct HDC__ * __stdcall BeginPaint(struct HWND__ *,struct tagPAINTSTRUCT *)" (?BeginPaint@@$$J18YGPAUHDC__@@PAUHWND__@@PAUtagPAINTSTRUCT@@@Z)", auf das in Funktion ""long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@$$FYGJPAUHWND__@@IIJ@Z)" verwiesen wird. 1>MainHelloWorld.obj : error LNK2028: Nicht aufgelöstes Token (0A000034) ""extern "C" int __stdcall TranslateMessage(struct tagMSG const *)" (?TranslateMessage@@$$J14YGHPBUtagMSG@@@Z)", auf das in Funktion ""extern "C" int __stdcall WinMain(struct HINSTANCE__ *,struct HINSTANCE__ *,char *,int)" (?WinMain@@$$J216YGHPAUHINSTANCE__@@0PADH@Z)" verwiesen wird. 1>MainHelloWorld.obj : error LNK2028: Nicht aufgelöstes Token (0A000036) ""extern "C" unsigned short __stdcall RegisterClassExW(struct tagWNDCLASSEXW const *)" (?RegisterClassExW@@$$J14YGGPBUtagWNDCLASSEXW@@@Z)", auf das in Funktion ""unsigned short __cdecl MyRegisterClass(struct HINSTANCE__ *)" (?MyRegisterClass@@$$FYAGPAUHINSTANCE__@@@Z)" verwiesen wird. 1>MainHelloWorld.obj : error LNK2028: Nicht aufgelöstes Token (0A000037) ""extern "C" struct HICON__ * __stdcall LoadIconW(struct HINSTANCE__ *,wchar_t const *)" (?LoadIconW@@$$J18YGPAUHICON__@@PAUHINSTANCE__@@PB_W@Z)", auf das in Funktion ""unsigned short __cdecl MyRegisterClass(struct HINSTANCE__ *)" (?MyRegisterClass@@$$FYAGPAUHINSTANCE__@@@Z)" verwiesen wird. 1>MainHelloWorld.obj : error LNK2028: Nicht aufgelöstes Token (0A000044) ""extern "C" int __stdcall ShowWindow(struct HWND__ *,int)" (?ShowWindow@@$$J18YGHPAUHWND__@@H@Z)", auf das in Funktion ""int __cdecl InitInstance(struct HINSTANCE__ *,int)" (?InitInstance@@$$FYAHPAUHINSTANCE__@@H@Z)" verwiesen wird. 1>MainHelloWorld.obj : error LNK2028: Nicht aufgelöstes Token (0A00004C) ""extern "C" struct HWND__ * __stdcall CreateWindowExW(unsigned long,wchar_t const *,wchar_t const *,unsigned long,int,int,int,int,struct HWND__ *,struct HMENU__ *,struct HINSTANCE__ *,void *)" (?CreateWindowExW@@$$J248YGPAUHWND__@@KPB_W0KHHHHPAU1@PAUHMENU__@@PAUHINSTANCE__@@PAX@Z)", auf das in Funktion ""int __cdecl InitInstance(struct HINSTANCE__ *,int)" (?InitInstance@@$$FYAHPAUHINSTANCE__@@H@Z)" verwiesen wird. 1>MainHelloWorld.obj : error LNK2028: Nicht aufgelöstes Token (0A000054) ""extern "C" int __stdcall UpdateWindow(struct HWND__ *)" (?UpdateWindow@@$$J14YGHPAUHWND__@@@Z)", auf das in Funktion ""int __cdecl InitInstance(struct HINSTANCE__ *,int)" (?InitInstance@@$$FYAHPAUHINSTANCE__@@H@Z)" verwiesen wird. 1>MainHelloWorld.obj : error LNK2028: Nicht aufgelöstes Token (0A000058) ""extern "C" void * __stdcall GetStockObject(int)" (?GetStockObject@@$$J14YGPAXH@Z)", auf das in Funktion ""unsigned short __cdecl MyRegisterClass(struct HINSTANCE__ *)" (?MyRegisterClass@@$$FYAGPAUHINSTANCE__@@@Z)" verwiesen wird. 1>MainHelloWorld.obj : error LNK2028: Nicht aufgelöstes Token (0A000059) ""extern "C" long __stdcall DefWindowProcW(struct HWND__ *,unsigned int,unsigned int,long)" (?DefWindowProcW@@$$J216YGJPAUHWND__@@IIJ@Z)", auf das in Funktion ""long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@$$FYGJPAUHWND__@@IIJ@Z)" verwiesen wird. 1>MainHelloWorld.obj : error LNK2028: Nicht aufgelöstes Token (0A00005E) ""extern "C" long __stdcall DispatchMessageW(struct tagMSG const *)" (?DispatchMessageW@@$$J14YGJPBUtagMSG@@@Z)", auf das in Funktion ""extern "C" long __cdecl DispatchMessage(struct tagMSG const *)" (?DispatchMessage@@$$J0YAJPBUtagMSG@@@Z)" verwiesen wird. 1>MainHelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""extern "C" int __stdcall GetMessageW(struct tagMSG *,struct HWND__ *,unsigned int,unsigned int)" (?GetMessageW@@$$J216YGHPAUtagMSG@@PAUHWND__@@II@Z)" in Funktion ""extern "C" int __cdecl GetMessage(struct tagMSG *,struct HWND__ *,unsigned int,unsigned int)" (?GetMessage@@$$J0YAHPAUtagMSG@@PAUHWND__@@II@Z)". 1>MainHelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""extern "C" long __stdcall DispatchMessageW(struct tagMSG const *)" (?DispatchMessageW@@$$J14YGJPBUtagMSG@@@Z)" in Funktion ""extern "C" long __cdecl DispatchMessage(struct tagMSG const *)" (?DispatchMessage@@$$J0YAJPBUtagMSG@@@Z)". 1>MainHelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""extern "C" int __stdcall DrawTextW(struct HDC__ *,wchar_t const *,int,struct tagRECT *,unsigned int)" (?DrawTextW@@$$J220YGHPAUHDC__@@PB_WHPAUtagRECT@@I@Z)" in Funktion ""extern "C" int __cdecl DrawText(struct HDC__ *,wchar_t const *,int,struct tagRECT *,unsigned int)" (?DrawText@@$$J0YAHPAUHDC__@@PB_WHPAUtagRECT@@I@Z)". 1>MainHelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""extern "C" int __stdcall UpdateWindow(struct HWND__ *)" (?UpdateWindow@@$$J14YGHPAUHWND__@@@Z)" in Funktion ""int __cdecl InitInstance(struct HINSTANCE__ *,int)" (?InitInstance@@$$FYAHPAUHINSTANCE__@@H@Z)". 1>MainHelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""extern "C" int __stdcall ShowWindow(struct HWND__ *,int)" (?ShowWindow@@$$J18YGHPAUHWND__@@H@Z)" in Funktion ""int __cdecl InitInstance(struct HINSTANCE__ *,int)" (?InitInstance@@$$FYAHPAUHINSTANCE__@@H@Z)". 1>MainHelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""extern "C" struct HWND__ * __stdcall CreateWindowExW(unsigned long,wchar_t const *,wchar_t const *,unsigned long,int,int,int,int,struct HWND__ *,struct HMENU__ *,struct HINSTANCE__ *,void *)" (?CreateWindowExW@@$$J248YGPAUHWND__@@KPB_W0KHHHHPAU1@PAUHMENU__@@PAUHINSTANCE__@@PAX@Z)" in Funktion ""int __cdecl InitInstance(struct HINSTANCE__ *,int)" (?InitInstance@@$$FYAHPAUHINSTANCE__@@H@Z)". 1>MainHelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""extern "C" long __stdcall DefWindowProcW(struct HWND__ *,unsigned int,unsigned int,long)" (?DefWindowProcW@@$$J216YGJPAUHWND__@@IIJ@Z)" in Funktion ""long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@$$FYGJPAUHWND__@@IIJ@Z)". 1>MainHelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""extern "C" void __stdcall PostQuitMessage(int)" (?PostQuitMessage@@$$J14YGXH@Z)" in Funktion ""long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@$$FYGJPAUHWND__@@IIJ@Z)". 1>MainHelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""extern "C" int __stdcall EndPaint(struct HWND__ *,struct tagPAINTSTRUCT const *)" (?EndPaint@@$$J18YGHPAUHWND__@@PBUtagPAINTSTRUCT@@@Z)" in Funktion ""long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@$$FYGJPAUHWND__@@IIJ@Z)". 1>MainHelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""extern "C" int __stdcall GetClientRect(struct HWND__ *,struct tagRECT *)" (?GetClientRect@@$$J18YGHPAUHWND__@@PAUtagRECT@@@Z)" in Funktion ""long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@$$FYGJPAUHWND__@@IIJ@Z)". 1>MainHelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""extern "C" struct HDC__ * __stdcall BeginPaint(struct HWND__ *,struct tagPAINTSTRUCT *)" (?BeginPaint@@$$J18YGPAUHDC__@@PAUHWND__@@PAUtagPAINTSTRUCT@@@Z)" in Funktion ""long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@$$FYGJPAUHWND__@@IIJ@Z)". 1>MainHelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""extern "C" unsigned short __stdcall RegisterClassExW(struct tagWNDCLASSEXW const *)" (?RegisterClassExW@@$$J14YGGPBUtagWNDCLASSEXW@@@Z)" in Funktion ""unsigned short __cdecl MyRegisterClass(struct HINSTANCE__ *)" (?MyRegisterClass@@$$FYAGPAUHINSTANCE__@@@Z)". 1>MainHelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""extern "C" void * __stdcall GetStockObject(int)" (?GetStockObject@@$$J14YGPAXH@Z)" in Funktion ""unsigned short __cdecl MyRegisterClass(struct HINSTANCE__ *)" (?MyRegisterClass@@$$FYAGPAUHINSTANCE__@@@Z)". 1>MainHelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""extern "C" struct HICON__ * __stdcall LoadCursorW(struct HINSTANCE__ *,wchar_t const *)" (?LoadCursorW@@$$J18YGPAUHICON__@@PAUHINSTANCE__@@PB_W@Z)" in Funktion ""unsigned short __cdecl MyRegisterClass(struct HINSTANCE__ *)" (?MyRegisterClass@@$$FYAGPAUHINSTANCE__@@@Z)". 1>MainHelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""extern "C" struct HICON__ * __stdcall LoadIconW(struct HINSTANCE__ *,wchar_t const *)" (?LoadIconW@@$$J18YGPAUHICON__@@PAUHINSTANCE__@@PB_W@Z)" in Funktion ""unsigned short __cdecl MyRegisterClass(struct HINSTANCE__ *)" (?MyRegisterClass@@$$FYAGPAUHINSTANCE__@@@Z)". 1>MainHelloWorld.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""extern "C" int __stdcall TranslateMessage(struct tagMSG const *)" (?TranslateMessage@@$$J14YGHPBUtagMSG@@@Z)" in Funktion ""extern "C" int __stdcall WinMain(struct HINSTANCE__ *,struct HINSTANCE__ *,char *,int)" (?WinMain@@$$J216YGHPAUHINSTANCE__@@0PADH@Z)". 1>C:\Dokumente und Einstellungen\GliderBugFix\Eigene Dateien\Visual Studio 2005\Projects\WinAPI\Debug\Win32_HALLO_WELT.exe : fatal error LNK1120: 32 nicht aufgelöste externe Verweise. 1>Das Buildprotokoll wurde unter "file://c:\Dokumente und Einstellungen\GliderBugFix\Eigene Dateien\Visual Studio 2005\Projects\WinAPI\Win32_HALLO_WELT\Debug\BuildLog.htm" gespeichert. 1>Win32_HALLO_WELT - 33 Fehler, 0 Warnung(en) ========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========
Ich tu mir echt Leid kann mir jemand vielleicht die Musterlösung für das angeblich einfachste Programm der WinAPI geben. P.S.: Das leichteste WinAPI Programm = schwerstes .NET Programm :->>>>