doubly defined CALLBACK

Started by
5 comments, last by gurgyfruut 20 years, 6 months ago
so I''m a retard, but I can''t figure this one out: when compiling the recently relased glut basecode in devc++ using the given project files, the compiler gives me: 78 c:\dev-c_~1\include\windows.h from c:\windows\desktop\nehegl_glut\src\tga.cpp:9: 84 c:\dev-c_~1\include\windef.h warning: `CALLBACK'' redefined 33 c:\dev-c_~1\include\gl\glut.h warning: this is the location of the previous definition so, in my experience messing with header files is a major no-no. anyone have suggestions? the linker is also giving me a load of undefined references such as c:\windows\desktop\nehegl_glut\devcpp\nehegl_glut_.o(.text+0x165):nehegl_glut_.c: undefined reference to `_imp__glIsEnabled'' although the header files all seem to be there. now i''m assuming for now that this stems from the double callback definition, but since the linker is being invoked at all, maybe not. is my glut.h too old? it says that it''s version 3.7. if so, where do i get an update. much obliged!!!!
Advertisement
Well,
I''m no expert but what I can see, you forgot to link to the GL library''s.
thanks!
how would i go about doing that? i thought that it did link because it found callback defined in glut.h
thanks again!
ok so i just added an ifndef endif pair to the header. still getting the linker error though. if i get it working, i''ll post the solution here. i did put -lglut -glu32 -lglaux and -lglut32 in the linker options just to try to cover all of my bases, but to no avail. are there any that i am missing? thanks!
-lopengl32
and I would recommend removine the -lglut unless your compiling for 16bit windows.
didn''t work
i''m going to try a newer version of devc++
maybe then the linker flags will set things straight. Thanks so much!!!
that was the weirdest thing in the world:
i downloaded the newest bloodshed version and still got tons of errors. then i re-extracted everything and it worked fine when i added the -lopengl32 even though i hadn''t changed ANYTHING! thanks so much for your help rjh!!!!
the moral is:
kids, don''t mess with bloodshed 4!

This topic is closed to new replies.

Advertisement