Skip to main content
gamedev.net
🔒 Locked

Link error

Started by dragon376 0 replies 650+ views
Original Post
dragon376
dragon376
I have the glext.h included in different files. for some reason, the #ifndef __glext_h_ #define __glext_h_ ... #endif doesn''t work because I have a redefinition of all the extension definition. I have to make my compiler /FORCE the outputfile otherwise I can''t compile. Anyone knows why is it doing that, and what I can do to fix this problem? Thanks
simbobx
simbobx

Well, that''s not a link error, it''s a compile error (Linkers don''t know or care about header files).

That aside .. what compiler are you using and can u give a (brief) example of the error given?

Something like "redefinition of #GL_BLAH" I presume?

I would be very surprised if the ''header guards'' (the #ifndef/#define stuff) weren''t working so I suspect the problem lies elsewhere.

Are the symbols that it''s complaining about just the ones you''re using or also ones you''re not? (nb: if the former case, look at where you''re using them because possibly this is at fault).

Are you using anyone else''s code? grep/search through all the headers you''re pulling in from 3rd parties and look for the symbols which are being redefined .. perhaps someone else has ''helpfully'' defined them for you to save you the trouble of including glext?

If all else fails, it ''might'' be the header guards not working for some reason, but tbh I''ve never seen a compiler that broke like that. Much much more likely that you really do have the symbols redefined somewhere else.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.