Results 1 to 10 of 10

Thread: OpenGL for Windows-95

  1. #1
    Junior Member Newbie
    Join Date
    May 2002
    Location
    Karnataka,India
    Posts
    9

    OpenGL for Windows-95

    I downloaded OpenGL95 and Glutdlls37 beta.When I unzipped them I got a bunch
    of header files, dlls, .lib files. I am using
    Borland C++ /Builder 4. Into which directories should I load these files. I tried loading .h into /borland/header .lib into /borland/lib and .dlls into /borland/bin
    directories. But it gives me compilation errors saying wingdapi is multiply defined.Can anybody help me setup this.

  2. #2
    Member Contributor
    Join Date
    Feb 2000
    Location
    Italy
    Posts
    77

    Re: OpenGL for Windows-95

    Have you tried including windows.h before gl.h?
    --
    Paolo M.

  3. #3
    Junior Member Newbie
    Join Date
    May 2002
    Location
    Karnataka,India
    Posts
    9

    Re: OpenGL for Windows-95

    Originally posted by paolom:
    Have you tried including windows.h before gl.h?
    Yes, it worked now. Thank you. But now
    I am getting some linker errors such as

    [Linker Error] Unresolved external 'glutInit' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER4\PROJECTS\PROJECT2.OBJ.

    I got the same message for all the functions I have used.
    But I have copied my glut.lib to my default
    library which is specified in the Project/options/Directories/Library path.
    Any idea how to solve this.

  4. #4
    Member Contributor
    Join Date
    Feb 2000
    Location
    Italy
    Posts
    77

    Re: OpenGL for Windows-95

    It seems you only left out to tell the linker which libs to link to.
    It should be somewhere in the project settings: you'll have to link in opengl.lib, glu.lib, and also glut.lib, from what I can deduce. Beware to use the right .LIB files, because the xxx32.lib usually are for VC
    --
    Paolo M.

  5. #5
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    Santa Cruz, CA
    Posts
    13

    Re: OpenGL for Windows-95

    you'll have to link in opengl.lib, glu.lib, and also glut.lib
    Good suggestion. I just wanted to note that in Borland C++Builder 4 opengl32.dll and glu32.dll are linked in for you in the import32.lib file for MS's OpenGL 1.1. To use glut, you do need to link an import library for that .dll.
    Use this command line
    implib glut.lib glut.dll
    and add glut.lib to your project via the project manager.

  6. #6
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    Santa Cruz, CA
    Posts
    13

    Re: OpenGL for Windows-95


    But I have copied my glut.lib to my default
    library which is specified in the Project/options/Directories/Library path.
    Any idea how to solve this.
    Just pointing to the directory is not enough. You have to explicitly link to it by adding it to your project or adding it to the LIBRARIES macro in the makefile(*.bpr).
    May I suggest using the VCL instead of glut since you are using Builder.
    You can find an article on how to do it at: http://community.borland.com/article...,10528,00.html
    Good luck.

  7. #7
    Junior Member Newbie
    Join Date
    May 2002
    Location
    Karnataka,India
    Posts
    9

    Re: OpenGL for Windows-95

    Originally posted by BJuano:

    But I have copied my glut.lib to my default
    library which is specified in the Project/options/Directories/Library path.
    Any idea how to solve this.
    Just pointing to the directory is not enough. You have to explicitly link to it by adding it to your project or adding it to the LIBRARIES macro in the makefile(*.bpr).
    May I suggest using the VCL instead of glut since you are using Builder.
    You can find an article on how to do it at: http://community.borland.com/article...,10528,00.html
    Good luck.

    I added the glut.lib file to my project using this USELIB("..\Bin\glut32.lib");
    but the linker says this style of function
    definition is obsolete and generates an error. Any Clue on what this is.

    Thanks

  8. #8
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    Santa Cruz, CA
    Posts
    13

    Re: OpenGL for Windows-95

    Originally posted by Rajesh:

    I added the glut.lib file to my project using this USELIB("..\Bin\glut32.lib");
    but the linker says this style of function
    definition is obsolete and generates an error. Any Clue on what this is.
    Builder can be picky with these macros. Did you add this yourself or did you add the file to the project (with the Project Manager) and let the IDE add that macro for you? I suggest the latter.

  9. #9
    Junior Member Newbie
    Join Date
    May 2002
    Location
    Karnataka,India
    Posts
    9

    Re: OpenGL for Windows-95

    Originally posted by BJuano:
    Builder can be picky with these macros. Did you add this yourself or did you add the file to the project (with the Project Manager) and let the IDE add that macro for you? I suggest the latter.

    I did not add the statement myself . I did
    and Add to Project from the Project drop down menu and gave the path of this library file. Is there a site for troubleshooting tips .

  10. #10
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    Santa Cruz, CA
    Posts
    13

    Re: OpenGL for Windows-95

    Originally posted by Rajesh:

    Is there a site for troubleshooting tips .
    Try asking this question on the Borland newsgroups
    NNTP: forums.borland.com
    group: borland.public.cppbuilder.graphics

Similar Threads

  1. openGL works on windows 2000 but not windows XP
    By Wondering Programmer in forum OpenGL: Windows
    Replies: 2
    Last Post: 04-04-2006, 07:00 AM
  2. Replies: 4
    Last Post: 06-15-2005, 06:35 AM
  3. Real Time Mapping of Windows NT Windows Onto an OpenGL object
    By pmilholl in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 08-08-2002, 03:42 PM
  4. Replies: 1
    Last Post: 06-09-2001, 09:11 AM
  5. where can i find the opengl programming for windows 95 and windows NT
    By victorswan in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-01-2001, 07:14 AM

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