Results 1 to 5 of 5

Thread: Unresolved External Error!!!!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Location
    England
    Posts
    312

    Unresolved External Error!!!!

    Righty, first here is the error

    Linking...
    LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
    Debug/The Window!.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

    This is only occuring when i try ot make an EXE and NOT when I compile it. It is compiling fine, but not making an EXE.

    If i delete the directory DEBUG then it only gives me this error

    Linking...
    LINK : fatal error LNK1104: cannot open file ".\Debug\The Window!.obj"
    Error executing link.exe.

    but still doesnt actually compile it for one reason or another.

    I have checked that i have all the INCLUDES in the INCLUDE directory, and they are all there.

    Thanks for any help.
    Power to 2000 Electronic Donkeys!
    www.edonkey2000.com
    I hate case sensitivity... all you get down the M1 is "are we there yet" and "ouch, watch the bumps".

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    First off, do you have a Win32 Application project, or Win32 Console Application? The first has WinMain as the entry point, and the second has main.

    To change it over, go to the Linker Settings section of Project Settings.

    You need to find a bit at the bottom (in the textbox) that has a /subsystem:console, and change it to /subsystem:windows



    Then do a Rebuild All.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Location
    England
    Posts
    312
    nope, gives me 25 errors now!!!!

    and example of which is

    The Window!.obj : error LNK2001: unresolved external symbol __imp__glClearColor@16
    The Window!.obj : error LNK2001: unresolved external symbol __imp__glShadeModel@4
    The Window!.obj : error LNK2001: unresolved external symbol __imp__glRasterPos2f@8
    The Window!.obj : error LNK2001: unresolved external symbol __imp__glColor3f@12

    Power to 2000 Electronic Donkeys!
    www.edonkey2000.com
    I hate case sensitivity... all you get down the M1 is "are we there yet" and "ouch, watch the bumps".

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Add opengl32.lib to your linker settings.

    It would have said that anyway
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Location
    England
    Posts
    312
    for some reason when i changed the subsystem it deleted all...

    OpenGL32.lib GLu32.lib GLaux.lib

    of the .lib files i had added. Thanks for bringing it to my attention
    Power to 2000 Electronic Donkeys!
    www.edonkey2000.com
    I hate case sensitivity... all you get down the M1 is "are we there yet" and "ouch, watch the bumps".

Posting Permissions

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



Click Here to Expand Forum to Full Width