J'ai encore des problèmes avec le linker:

Linking...
main.obj : error LNK2019: unresolved external symbol __imp__GetStockObject@4 referenced in function _WinMain@16
C:\Documents and Settings\Moi\Mes documents\Visual Studio 2005\Projects\test project sol\Debug\test project.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Moi\Mes documents\Visual Studio 2005\Projects\test project sol\test project\Debug\BuildLog.htm"
test project - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Est-ce que quelqu'un peut m'aider? Voici le code source du programme, tiré d'un turoriel:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <windows.h>
 
 
WNDCLASS wc; 
HWND hWnd; 
MSG msg; 
 
LRESULT CALLBACK WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) 
{ 
switch (uMsg) 
{ 
case WM_CLOSE: 
PostQuitMessage (0); 
break; 
default: 
return DefWindowProc (hwnd,uMsg,wParam,lParam); 
break; 
} 
return 0; 
} 
 
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int CmdShow) 
{ 
	wc.style = CS_OWNDC; 
	wc.lpfnWndProc = WindowProc; 
	wc.cbClsExtra = 0; 
	wc.cbWndExtra = 0; 
	wc.hInstance = hInstance; 
	wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); 
	wc.hCursor = LoadCursor(NULL, IDC_ARROW); 
	wc.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH); 
	wc.lpszMenuName = NULL; 
	wc.lpszClassName = "OGL"; 
 
	RegisterClass(&wc); 
 
	hWnd = CreateWindow("OGL", "Fenetre OpenGL", 
		WS_CAPTION | WS_POPUPWINDOW | WS_VISIBLE, 
		0, 0, 640, 480, NULL, NULL, hInstance, NULL );
 
	while (GetMessage (&msg, NULL, 0, 0)) { 
		TranslateMessage (&msg); 
		DispatchMessage (&msg); 
	} 
 
	return 0; 
 
}