Board index » cppbuilder » Opengl in Borland C++ Compiler 5.5

Opengl in Borland C++ Compiler 5.5


2004-11-24 06:53:52 AM
cppbuilder94
Hello,
I'm using the Borland C++ Compiler 5.5 With Command Line Tools Version 5.5.1
but after following the instructions for opengl usage in a couple of web
pages I still cannot compile the code because the compiler cannot find the
libraries. I'm using win98 2E.
I really don't understand why it doens't work so I'm hoping someone could
help me!
Here is what I did in one of the try number 1 with the help of this site
sbenavides.tripod.com/OpenGL.html :
1. Extracted the compiler to C:\Borland\BCC55
2. Add PATH=C:\BORLAND\BCC55\BIN;%PATH%
to "autoexec.bat" file
3. Copy the header file "glut.h" to the BORLAND\BCC55\INCLUDE\GL directory.
4. Copy "glut32.lib" into the BORLAND\BCC55\LIB directory.
5. Copy "glut32.dll" into the Windows\System directory.
6. create the bcc32.cfg and ilink32.cfg in bin
7. try to compile the file program1.cpp like this
Quote
bcc32 program1.cpp glut32.lib
but with no success, all the errors were due to undefined function or
undefined symbol... because the compiler didin't get the library...
The I tried another site www.gantless.com/borland.html and I did what
they said:
1 to 3. same as previous example
4. copy the 4 dll files glut32.dll, opengl32.dll, glu32.dll and glut.dll to
c:\windows\system
5. used the implib comand to produce the .lib 4 files using the previous
dll's
6. tried to compile an example and the same errors apeared as previous
I think that's all. I really apreciate some help!
Thanks,
Filipa
 
 

Re:Opengl in Borland C++ Compiler 5.5

Well, to start with the author has an error in his header
file GLUT.H
------------
/* define APIENTRY and CALLBACK to null string if
we aren't on Win32 */
#if !defined(WIN32)
#define APIENTRY
#define CALLBACK
#endif
------------
The macro defined under Win32 is __WIN32__ and not WIN32.
The effect of the failed test for the existence of the
macro is to change the declared calling convention for
the functions and therefore the public names that will be
given to those functions. This results in function not
found errors.
I tried to build the file program1.cpp from the 'sbenavides'
link which you provided. After altering the macro name it
turns out that this GUI program must be built in Console mode, a fact that the web site should have mentioned. After
changing to the console mode option -WC the program built
but when run it failed because the provided GLUT32.DLL
requires two other DLL's that are not provided, OPENGL32.DLL
and GLU32.DLL
A web search turned up these links for them:
www.shorl.com/fujepritrepruse
www.shorl.com/hopobradigrure
After downloading and virus scanning them I was met with an
error box complaining that the OPENGL32.DLL file requires
a later version of Windows than I am running.
In other words, your complaints are related to the site
from which you got that code and not with the compiler.
. Ed
Quote
Filipa Andrade wrote:

I'm using the Borland C++ Compiler 5.5 With Command
Line Tools Version 5.5.1 but after following the
instructions for opengl usage in a couple of web
pages I still cannot compile the code because the
compiler cannot find the libraries. I'm using win98 2E.

I really don't understand why it doens't work so I'm
hoping someone could help me!

Here is what I did in one of the try number 1 with the
help of this site
sbenavides.tripod.com/OpenGL.html :
1. Extracted the compiler to C:\Borland\BCC55
2. Add PATH=C:\BORLAND\BCC55\BIN;%PATH%
to "autoexec.bat" file
3. Copy the header file "glut.h" to the BORLAND\BCC55\INCLUDE\GL directory.
4. Copy "glut32.lib" into the BORLAND\BCC55\LIB directory.
5. Copy "glut32.dll" into the Windows\System directory.
6. create the bcc32.cfg and ilink32.cfg in bin
7. try to compile the file program1.cpp like this
>bcc32 program1.cpp glut32.lib
but with no success, all the errors were due to undefined function or
undefined symbol... because the compiler didin't get the library...

The I tried another site www.gantless.com/borland.html and I did what
they said:
1 to 3. same as previous example
4. copy the 4 dll files glut32.dll, opengl32.dll, glu32.dll and glut.dll to
c:\windows\system
5. used the implib comand to produce the .lib 4 files using the previous
dll's
6. tried to compile an example and the same errors apeared as previous

I think that's all. I really apreciate some help!

Thanks,
Filipa


 

Re:Opengl in Borland C++ Compiler 5.5

The compiler you are using is the set of command line
tools from C++ Builder version 5. This newsgroup is where
the old, 1997, Borland C++ compiler is covered. Please
post C++ Builder messages in C++ Builder newsgroups, groups
with the word 'cppbuilder' in their name.
. Ed
 

{smallsort}

Re:Opengl in Borland C++ Compiler 5.5

Ok! Thanks for the help!
"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote

The compiler you are using is the set of command line
tools from C++ Builder version 5. This newsgroup is where
the old, 1997, Borland C++ compiler is covered. Please
post C++ Builder messages in C++ Builder newsgroups, groups
with the word 'cppbuilder' in their name.

. Ed