robfinalfantasy
02-18-2007, 02:16 AM
#include <windows.h>
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
MessageBox(NULL, "\tHello World!", "My first windows app", NULL);
return 0;
}
When I compile the code it says there are 0 errors, 0 warnings.
When I execute the code it says there are 2 errors.
--------------------Configuration: main - Win32 Debug--------------------
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/main.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
main.exe - 2 error(s), 0 warning(s)
Any guesses on what they could be? I copied the code exactly from this tutorial (http://www.tutorialized.com/tutorial/OpenGL-and-Windows/4274).
My compiler is Microsoft Visual C++ 6.0 and yes I have a main.cpp defined (which only contains the code above). This code uses OpenGL to produce a window of some sort. Could it have something to do with my OpenGL drivers or possible lack of? My video card is an ATI RADEON XPRESS 200M with drivers dated 4/11/2005 version 6.14.10.6539.
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
MessageBox(NULL, "\tHello World!", "My first windows app", NULL);
return 0;
}
When I compile the code it says there are 0 errors, 0 warnings.
When I execute the code it says there are 2 errors.
--------------------Configuration: main - Win32 Debug--------------------
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/main.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
main.exe - 2 error(s), 0 warning(s)
Any guesses on what they could be? I copied the code exactly from this tutorial (http://www.tutorialized.com/tutorial/OpenGL-and-Windows/4274).
My compiler is Microsoft Visual C++ 6.0 and yes I have a main.cpp defined (which only contains the code above). This code uses OpenGL to produce a window of some sort. Could it have something to do with my OpenGL drivers or possible lack of? My video card is an ATI RADEON XPRESS 200M with drivers dated 4/11/2005 version 6.14.10.6539.