Results 1 to 3 of 3

Thread: Unresolved Externals

  1. #1
    Guest

    Unresolved Externals

    I'm trying to get started in opengl, I tried compiling a simple program, but I get
    LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
    Debug/gl.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

    Dunno whats going on. Help?

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    London
    Posts
    503

    Re: Unresolved Externals

    Odd, it's usually the other way around. Are you using GLUT? If so, did you create your project (assuming you're using MSVC) as a Win32 console application rather than a normal Win32 application?

  3. #3
    Member Newbie
    Join Date
    Feb 2001
    Location
    Kiel, Germany
    Posts
    38

    Re: Unresolved Externals

    WinMain is the entry point for an Win32 application. If you want to use standard c main as the entry point, do the following (under MSVC):

    Go to the project settings, Linker-Tab, Output and enter "mainCRTStartup" as the entry point (type it in exactly with upper- and lowercase).

    After this the standard main-function will be used as your applications starting point.

    Hope this helps.

    P.S.: I forgot to mention, taht you should start with a win application. That prevents Windows from generating a console window every time you run your application.

    [This message has been edited by CoBour (edited 03-23-2001).]

Similar Threads

  1. nvparse - unresolved externals
    By okapota in forum OpenGL: Advanced Coding
    Replies: 11
    Last Post: 11-10-2002, 07:32 AM
  2. Unresolved Externals
    By SilentSno in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 12-21-2001, 08:55 AM
  3. what are unresolved externals???
    By cali in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-28-2001, 01:45 AM
  4. Unresolved Externals
    By Wolfling in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 02-01-2001, 07:50 AM
  5. Unresolved Externals..
    By Mercalli in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 12-15-2000, 12:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean