People sometimes think that SFML automatically includes GLEW (a library which manages OpenGL extensions) because SFML uses GLEW internally, but it's only an implementation detail. From the user's point of view, GLEW must be handled like any other external library.Please explain in detail how to connect glew to sfml 2.2?
Please explain in detail how to connect glew to sfml 2.2?Wrong question ;)
C:\Dev\glew-1.12.0\include;Linker / General / Additional Library Directories:
C:\Dev\glm;
C:\Dev\SFML-2.2\include
C:\Dev\SFML-2.2\lib;C/C++ / Preprocessor / Preprocessor Definitions:
C:\Dev\glew-1.12.0\lib\Release\Win32
SFML_STATIC;GLEW_STATIC;WIN32;NDEBUG;_CONSOLELinker » Input » Additional Dependencies:
glew.lib;Errors:
glew32s.lib;
winmm.lib;
freetype.lib;
jpeg.lib;
opengl32.lib;
sfml-graphics-s.lib;
sfml-window-s.lib;
sfml-system-s.lib;
%(AdditionalDependencies)
1>glew.lib(glew.obj) : error LNK2005: ___glewCopyTexSubImage3D уже определен в glew32s.lib(glew.obj)
1>glew.lib(glew.obj) : error LNK2005: ___glewDrawRangeElements уже определен в glew32s.lib(glew.obj)
1>glew.lib(glew.obj) : error LNK2005: ___glewTexImage3D уже определен в glew32s.lib(glew.obj)
1>glew.lib(glew.obj) : error LNK2005: ___glewTexSubImage3D уже определен в glew32s.lib(glew.obj)
1>glew.lib(glew.obj) : error LNK2005: ___glewActiveTexture уже определен в glew32s.lib(glew.obj)
...
glew32s.lib;Errors:
winmm.lib;
freetype.lib;
jpeg.lib;
opengl32.lib;
sfml-graphics-s.lib;
sfml-window-s.lib;
sfml-system-s.lib;
%(AdditionalDependencies)
1>LINK : warning LNK4098: библиотека по умолчанию "LIBCMT" противоречит использованию других библиотек; используйте параметр /NODEFAULTLIB:library
1>sfml-graphics-s.lib(GLExtensions.cpp.obj) : error LNK2001: неразрешенный внешний символ "_glewGetErrorString"
1>sfml-graphics-s.lib(GLExtensions.cpp.obj) : error LNK2001: неразрешенный внешний символ "_glewInit"
glew.lib;Errors:
winmm.lib;
freetype.lib;
jpeg.lib;
opengl32.lib;
sfml-graphics-s.lib;
sfml-window-s.lib;
sfml-system-s.lib;
%(AdditionalDependencies)
1>main.obj : error LNK2001: неразрешенный внешний символ "_glewInit@0"
1>LINK : warning LNK4098: библиотека по умолчанию "LIBCMT" противоречит использованию других библиотек; используйте параметр /NODEFAULTLIB:library
1>sfml-graphics-s.lib(GLExtensions.cpp.obj) : error LNK2001: неразрешенный внешний символ "_glewGetErrorString"
1>sfml-graphics-s.lib(GLExtensions.cpp.obj) : error LNK2001: неразрешенный внешний символ "_glewInit"
1>main.obj : error LNK2001: неразрешенный внешний символ "_glewInit@0"Seriously?
Seriously?Sorry, I don't understand the question?
I don't understand the error messages...Sorry, my visual studio only in russian language
1>LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other libs; use /NODEFAULTLIB:library
1>sfml-graphics-s.lib(GLExtensions.cpp.obj) : error LNK2001: unresolved external symbol "_glewGetErrorString"
1>sfml-graphics-s.lib(GLExtensions.cpp.obj) : error LNK2001: unresolved external symbol "_glewInit"
1>main.obj : error LNK2001: unresolved external symbol "_glewInit@0"
may be I need to use another version of glew?No, it should work.
You need to recompile SFML with your version of glew.No...
QuoteYou need to recompile SFML with your version of glew.No...
Interesting, because without recompiling I have the same errors.Which compiler do you use?
=== Build: Release in GLS (compiler: GNU GCC Compiler) ===
Warning: resolving _glewInit by linking to _glewInit@0
Warning: resolving _glewGetErrorString by linking to _glewGetErrorString@4
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
=== Build finished: 0 error(s), 3 warning(s) (0 minute(s), 4 second(s)) ===
=== Run: Release in GLS (compiler: GNU GCC Compiler) ===