Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

OpenGL not working.. why?

for some reason my compiler will not find the OGL header files that it needs to run a prog. I have the headers in question and have tried putting the headers with the others in my include directory and added them to my project.. still nothing. i've tried two different compilers and it can't find gl.h, glaux.h, or glu.h.... am i doing something wrong?
i can include any other header but these three....
thanks for any help

Comments

  • SephirothSephiroth Fayetteville, NC, USAPosts: 1,035Member
    : for some reason my compiler will not find the OGL header files that it needs to run a prog. I have the headers in question and have tried putting the headers with the others in my include directory and added them to my project.. still nothing. i've tried two different compilers and it can't find gl.h, glaux.h, or glu.h.... am i doing something wrong?
    : i can include any other header but these three....
    : thanks for any help
    :
    The headers should be in your "include/gl" directory (folder). You include them with a line that reads "#inlclude ", NOT "". The gl header is the only one you NEED, and glu is just a bunch of utilities, such as the one I use the most, gluLookAt(). The other file, "glaux", is obsolete as far as I have seen. It used to contain functions for loading images and such, but in the current release I have not been able to make anything in there work, nor have I seen any application use anything from within that header successfully. It may be there for script-kiddies who can't code and use Visual and the compiler uses it. All you need to make OpenGL work is "gl.h", and if you don't know much math for dealing with matrices and other camera or position-oriented changes, include "glu.h".

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]

  • the_architectthe_architect Posts: 5Member

    : The headers should be in your "include/gl" directory (folder). You include them with a line that reads "#inlclude ", NOT "".


    ok i tried this and tried the whole path c:.....
    and still no luck... i dont understand why its not working
    if it helps i am using dev-cpp 4, maybe i dont have something right
    thanks for the info on the other headers tho
  • SephirothSephiroth Fayetteville, NC, USAPosts: 1,035Member
    :
    : : The headers should be in your "include/gl" directory (folder). You include them with a line that reads "#inlclude ", NOT "".
    :
    :
    : ok i tried this and tried the whole path c:.....
    : and still no luck... i dont understand why its not working
    : if it helps i am using dev-cpp 4, maybe i dont have something right
    : thanks for the info on the other headers tho
    :
    OK, so your OpenGL headers ARE in your "include/gl" directory? If so, don't use the whole path and try like I showed you. If that fails put them in quotations and use the entire path, but do NOT use long filenames, use the 8.3 format, so for long folder names you need to type the first six letters (excluding spaces) then do a tilde and one.

    ie: C:Program Files is actually C:Progra~1

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]

  • the_architectthe_architect Posts: 5Member
    ok i am starting to feel like an idiot... no matter what i do it wont find the file...
    <> or "" still doesnt work... full path or not...
    its got to be something simple right?
    sorry i'm such a hard case :)
  • CroWCroW Posts: 348Member
    have you tried to copy the gl**.h files directly to c: an include them from there?sure,thats not the smart way,but youll see if theres something wrong with your compiler/includefiles...
  • the_architectthe_architect Posts: 5Member
    : have you tried to copy the gl**.h files directly to c: an include them from there?sure,thats not the smart way,but youll see if theres something wrong with your compiler/includefiles...
    :


    still no.... doesnt work for VC++ 6.0 either... two compilers not acting right.. what are the chances?
  • SephirothSephiroth Fayetteville, NC, USAPosts: 1,035Member
    : : have you tried to copy the gl**.h files directly to c: an include them from there?sure,thats not the smart way,but youll see if theres something wrong with your compiler/includefiles...
    : :
    :
    :
    : still no.... doesnt work for VC++ 6.0 either... two compilers not acting right.. what are the chances?
    :
    Sounds like your compilers are not configured properly. I had that problem with the newest version of Borland, but got around it using 8.3 formats for the include configs.

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]

  • XLoomXLoom Posts: 129Member
    I have only one idea after reading these posts, are you sure that the problem is with header files and not linking? What error do you precisely get, does it specifically say that header files are not found? If not then do you have libraries set properly? Do you have in 'Project Options->Linker options' these two?
    -lopengl32 -lglu32

    XLoom

Sign In or Register to comment.