#### Archived

This topic is now archived and is closed to further replies.

# doubly defined CALLBACK

This topic is 5417 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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!!!!

##### Share on other sites
Well,
I''m no expert but what I can see, you forgot to link to the GL library''s.

##### Share on other sites
thanks!
how would i go about doing that? i thought that it did link because it found callback defined in glut.h
thanks again!

##### Share on other sites
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!

##### Share on other sites
-lopengl32
and I would recommend removine the -lglut unless your compiling for 16bit windows.

##### Share on other sites
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!!!

##### Share on other sites
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!

1. 1
2. 2
JoeJ
20
3. 3
frob
19
4. 4
5. 5

• 10
• 11
• 12
• 13
• 9
• ### Forum Statistics

• Total Topics
632208
• Total Posts
3004774

×