I had the same problem with OpenGL on Borland C++ but I got it working there are couple of ways
the simplest way to do this and perhaps the most explicit is to add this to the start of your code
#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" )
(RECOMMENDED DUE TO CROSS PLATFORM COMPATIBILITY )
Alternatively you can modify your Link settings again. This is done by pressing ALT-F7 and going to the Link Tab as shown previously. You will have to select either DEBUG or RELEASE mode here as you can not modify both linker settings at the same time with the 'All Configurations' selection. Therefore select DEBUG for now and you need to modify the following.
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glut32.lib glu32.lib /nologo /subsystem:console incremental:yes /pdb:"Debug/test01.pdb /debug /machine:I386 /out:"Debug/test01.exe" /pdbtype:sept
Above is how it originally looks. The highlighted in red /subsystem:console needs to be changed to
/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup
This sets the /SUBSYSTEM to Windows as opposed to Console. When this is defined, Visual C++ expects to find a WinMain as opposed to the regular main() in a C or C++ console application. Therefore it is necessary to specify the /ENTRY: as mainCRTStartup.
Once you have done that you can run it by pressing F5 and you will see nothing on your screen.... which is what you want.