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.

Have you tried including windows.h before gl.h?

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.

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

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.


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/0,1410,10528,00.html
Good luck.

Originally posted by BJuano:
[b] [quote]
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/0,1410,10528,00.html
Good luck.[/b][/QUOTE]

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

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.

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 .

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