Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Help

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2005
    Posts
    1

    Help

    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

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Aug 2004
    Location
    munich, germany
    Posts
    658

    Re: Help

    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

    Code :
    int main(int argc, char *argv[]) {
    }
    or

    Code :
    void main(int argc, char *argv[]) {
    }
    depending on the compiler.

    for windows-based programs you need something like

    Code :
    int WinMain(...) {
    }
    there should be some examples included in your visual studio distribution. study them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •