PDA

View Full Version : Help



yomama
03-24-2005, 08:30 AM
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

HELP PLEASE:)

RigidBody
03-24-2005, 10:04 AM
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[]) {
}or


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.