I’m not sure what this means or how to fix it, but it’s driving me crazy!

I’m using WindowsXP and Visual Studio to run OpenGL

These are my errors:

LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Test.exe : fatal error LNK1120: 1 unresolved externals


in every c/c++ program you have to define a main function which is the first function that is called when the program is executed.

if you want a program which runs in linux/unix terminal window or dos, it can be

int main(int argc, char *argv[]) {


void main(int argc, char *argv[]) {

depending on the compiler.

for windows-based programs you need something like

int WinMain(...) {

there should be some examples included in your visual studio distribution. study them.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.