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 3 of 3

Thread: something wrong with my vc++???

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2004
    Location
    CHINA
    Posts
    3

    something wrong with my vc++???

    /////////////////////////////////////////////
    #include <GL/glut.h>
    #include <stdlib.h>
    void main()
    {
    }
    I can not tell , so simple code can not be builded! and the error:
    Linking...
    LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
    Debug/test_2.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

    test_2.exe - 2 error(s), 0 warning(s)
    Could you help me my friends.Thanks
    Just Do It!

  2. #2
    Member Regular Contributor
    Join Date
    Jun 2002
    Posts
    366

    Re: something wrong with my vc++???

    Add /SUBSYSTEM:console to your linking options when creating using c main() entry points.

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2004
    Location
    Moraga, CA , USA
    Posts
    13

    Re: something wrong with my vc++???

    I was getting the same broblem, go to preferances/properties (don't remember what it is called) and go to link and system and change from a windows app to a conslo app. The compiler is looking for winmain because you are making a windows app.

Posting Permissions

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