Advertisement

redeclaration of C++ built-in type

Started by July 28, 2004 01:15 AM
33 comments, last by Kylotan 7 years, 6 months ago
Just realized why that 1 project worked.

It's not using Glut. only gl and glu... feck feck feck FEEECCKK!!!

Time to blast some shit in halo...
==============================
A Developers Blog | Dark Rock Studios - My Site
Look in the header file see if there are references to glutInitWithExit, glutCreateWindowWithExit and glutCreateWindowWithExit, like, for example, taking their address (function pointers?).

You can also get your preprocessor to dump the list of macros it has implicitely defined (IIRC, cpp -dM) -- see if things are different in the project that worked. Or compare the preprocessed output, see if the naughty bits are taken out somehow, or actually made correct.

Does MinGW-g++ need to link to other libraries to provide WinMain, or is that the usual entry point?

Also, see if using FreeGLUT makes things better.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Advertisement
i am no expert in this but i have had the same sort of problems while trying to compile managed types with none managed types, i would suggest this if you do not want to use a 3rd party glut.

#undef wchart_t#include <glut.h>


it may solve your problem but may also create more problems i am unsure of this.

(edit: ignore me if u feel the need as i am probably to inexperienced in this to be of any help)
Zyme the fruit of um, er k what ever :D
wchar_t is not a macro, it's a built-in type, just like char, short, int, long, float and double are.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Ok that project I thought was working is only using gl and glu...

But Dev C++ generates templates 1 of which is a basic open GL window which WAS compiling eariler 2 nite and now does not. So I just need to reset all my fucking headers and libs. This FreeGlut seems to b native to Linux, having a lil trouble finding the win32 binaries but ill keep looking.
==============================
A Developers Blog | Dark Rock Studios - My Site
OH SWEETNESS!!! they have a free glut package specificaly for dev c++!!! I LOVE U GUY!!!
==============================
A Developers Blog | Dark Rock Studios - My Site
Advertisement
oo... ssoo... close...

All the errors are gone except this:

76 C:\Dev-Cpp\my code\openGL\my code\template\main.cpp
`exit' undeclared (first use this function)

==============================
A Developers Blog | Dark Rock Studios - My Site
I do a compile of just:

#include <GL/freeglut.h>

and get the following error:

cannot find -llibfreeglut

WTF!!!! i know its there im looking at the damn thing!
==============================
A Developers Blog | Dark Rock Studios - My Site
Check your library path.
exit() is declared in <stdlib.h>/<cstdlib>
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
awesome ok fixxed the exit problem. Now no matter which lib i use it says it cant b found...

Both the libfreeglut.a and libglut32.a
opengl really does hate :(....

so close too so close...
==============================
A Developers Blog | Dark Rock Studios - My Site

This topic is closed to new replies.

Advertisement