PDA

View Full Version : Absolute beginner Second Question



Gwynnnn
12-06-2006, 06:01 AM
Ok well thanks to everyone for yesterday. We managed to get open gl to work using Borland C++ Developer.

I have moved on to try to get GLUT to work too as I believe that it will be needed.

I have put the code onto www.good-image.co.uk (http://www.good-image.co.uk) but really all I have done is take the working code from yesterday and added include gl/glut.h

The application still compiles ok (as I am not yet using any glut items) but the make fails as below.

I do not even know what it means (yet). Can anyone shed any light onto this and offer some remedy?

Error message:
[C++ Error] glut.h(146): E2337 Only one of a set of overloaded functions can be "C"

This is the area in glut.h that get highlighted on the make.
#if defined(_WIN32)
# ifndef GLUT_BUILDING_LIB
extern _CRTIMP void __cdecl exit(int); <<<<<<<<<<
# endif

thinks
12-06-2006, 07:04 AM
I had a similar error with Visual Studio. In my case it had something to do with the standard libraries that Visual Studio includes.

Hope that helps!

Gwynnnn
12-06-2006, 08:04 AM
Nope, but thanks for mentioning it. I still don;t know what to do about it, if anything can be done.

Anyone else know what is wrong and what can be done to fix it?

Gwynnnn
12-06-2006, 09:08 AM
It seems (having looked on the web) that this is a common problem, but I could not extract exactly what I need to do to resolve it.

marc2718
12-06-2006, 03:38 PM
Why would you even need GLUT with CBuilder?
The GLUT libraries provide some basic functions for windowing, menus, and user input; they are very basic stuff.
C++ Builder makes it very easy to create windows and input way more advanced than GLUT.
I don't recommend it, but that's up to you. Alot of learning examples use GLUT but you can easily replace those parts with C++.

The only library you will probably need is GLU, which provides functions that make it easier define the cameras location and some other useful functions.
But even GLU is optional and eventually you may not even use it. GLU is not a very large library so it's not a big problem to include it.

k_szczech
12-07-2006, 12:57 AM
GLUT - manage window, OpenGL context, mouse, keyboard - this is exactly what you allready have under BCB
GLU - OpenGL utilities
GLAUX - some more helpful stuff

So, if you have a VCL window with a working OpenGL context and you can render to it then you don't need GLUT.
If you want to compile your applications on Linux, or under Visual Studio (or some other compiler), then you should use GLUT instead of VCL (that means you only use Builder as compiler, but you don't create any windows in it).