I am working on my first bigger game. After a long conceptual period of time I come up with a appropriate architecture design. Now I try to implement the basic components. The window component is finished now and the renderer component comes next.
What I need for the renderer is OpenGL and
as I read here, an extension wrapper like GLEW.
I am struggling with including and initializing GLEW.
#define GLEW_STATIC
#include <glew/glew.h>
glewExperimental = GL_TRUE;
glewInit();
I correctly added GLEW header and library to the project. Without the glewInit() my code compiles. The error message reads as follows. In English it means that there are several symbols defined multiple times. So the problem is that some GLEW constants also are defined somewhere else. My assumption is that SFML/Window.cpp could do that. Because that is the only SFML header I include for now, except of SFML/OpenGL.cpp which definitely stays after the GLEW include.
Fehler 2516 error LNK1169: Mindestens ein mehrfach definiertes Symbol gefunden.
Fehler 1945 error LNK2005: ___GLEW_3DFX_multisample ist bereits in sfml-graphics-s-d.lib(glew.obj) definiert.
Fehler 1946 error LNK2005: ___GLEW_3DFX_tbuffer ist bereits in sfml-graphics-s-d.lib(glew.obj) definiert.
Fehler 1947 error LNK2005: ___GLEW_3DFX_texture_compression_FXT1 ist bereits in sfml-graphics-s-d.lib(glew.obj) definiert.
...
Fehler 2466 error LNK2005: ___wglewWaitForSbcOML ist bereits in sfml-graphics-s-d.lib(glew.obj) definiert.
Fehler 2514 error LNK2005: _glewExperimental ist bereits in sfml-graphics-s-d.lib(glew.obj) definiert.
My architecture is complicated to explain, because it isn't a common solution but my own invention.
Facts: Windows 8, Visual Studio 11, OpenGL 3.0+, SFML 2.0 RC (static linked), GLEW newest