Results 1 to 6 of 6

Thread: Linking errors at building OpenGL Program :(

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2002
    Location
    Alex/Egypt
    Posts
    2

    Linking errors at building OpenGL Program :(

    Hi PalZ ...

    I dont know what to do with this error :

    [ Compiling...
    gl1.cpp
    Linking...
    LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
    Debug/gl1.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

    gl1.exe - 2 error(s), 0 warning(s)]


    i'm working on MS Visual c++ 6 ...

    i'm working on WindowsXP bulid2600 ...

    i've added the Lib files to the Settings|link|object/library modules
    glu32.lib , glut32.lib , opengl32.lib .

    i've added glu32.dll & glu32.lib & glut32.dll & glut32.lib &
    opengl32.dll & opengl32.lib .

    i've included gl.h & glu.H & glut.32.H

    PleeeeeeeeeeeeeeeeeeeeeeeeeZ Help Me ....

    email me at [motagaly@yahoo.com]

    Thanx 4 any help ...
    [[[ Motagaly On-Line ]]]
    -=[ Fly with your Fantasy =-

  2. #2
    Junior Member Newbie
    Join Date
    Jul 2002
    Posts
    13

    Re: Linking errors at building OpenGL Program :(

    just type:

    #include <GL/glut.h>

    that should work fine.
    enjoy!

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2002
    Location
    Alex/Egypt
    Posts
    2

    Re: Linking errors at building OpenGL Program :(

    i've already copy the *.h files
    thr 3 files gl.h & glu.h & glut.h from

    $(MSVC Directory)/include/GL/*.h

    to the

    $(MSVC Directory)/include/*.h


    but it give me the same error ...
    i think there is a problem with WinXP ...

    Any WaY ... ThanX alot Great Man
    [[[ Motagaly On-Line ]]]
    -=[ Fly with your Fantasy =-

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: Linking errors at building OpenGL Program :(

    Why would including the GLUT header fix the missing symbol? Including a header is a compile time process, and the missing symbol is a linker error.

    You have created the wrong type of executable project. There are two common types; Application and Console Application. An Application requires a WinMain() function, and a Console Application requires a main() function. Dependeing on which of these two functions you have, you have to create the right type of project.

  5. #5
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: Linking errors at building OpenGL Program :(

    i think there is a problem with WinXP
    No, the problem is that you don't know your compiler enough. The settings of your project does not match the code.

  6. #6
    Junior Member Newbie
    Join Date
    Jul 2002
    Posts
    13

    Re: Linking errors at building OpenGL Program :(

    ooops!
    bob's right.

Similar Threads

  1. a opengl es program linking error
    By wycwang in forum OpenGL ES
    Replies: 11
    Last Post: 04-24-2008, 10:09 PM
  2. Linking errors
    By RaulHuertas in forum COLLADA
    Replies: 3
    Last Post: 03-22-2008, 11:29 AM
  3. OpenGL ES Linking Errors
    By jensr in forum OpenGL ES
    Replies: 5
    Last Post: 10-31-2007, 06:31 AM
  4. Replies: 2
    Last Post: 05-03-2007, 08:16 PM
  5. Linking Errors
    By Abacaxi in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 06-12-2005, 10:04 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