So I have been watching a tutorial on youtube for using openGL, Glew and SDL2 in c++. I compiled it (Im using Code Blocks) at first what seemed as correctly because I didnt get any errors or warnings but then In the tutorial we got to using glGenBuffers which caused an unidentified reference to show up. So i looked it up on google and got that I should have linked -lglew32s in front of the rest of the linked libraries. So my linked libraries under "Other Linker Options" are -lglew32s -lmingw32 -lSDL2main -lSDL2 -lopengl32 -lglew32 (in that order).
I combined my SDL2 includes with GL includes and linked that one folder in the compiler under 'Search Directories". For the libs i combined the two glew lib files (glew32 and glew32s) with the SDL2 libs and I linked that one folder for the linker in the "Search Directories".
I also put the glew32.dll and the sdl2.dll files inside of my debug folder of my project. This location works because this is where I have put all of my SDL dlls in before for the sdl stuff i have done in other projects.
And finally at the top of the header files for the classes and in main.cpp i put:
#define GLEW_STATIC
#include <SDL2/SDL.h>
#include <GL/glew.h>
In that order from the top.
But now I get the warning:
.drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
I looked it up and I think it is a conflict with 2 libraries. So does that mean that http://sourceforge.net/projects/glew/files/glew/1.12.0/ was not the right download for mingw. Im not sure but im hoping someone can give me a solution to fixing the warning. So far the codes using glew run fine but im not sure if that will change in the future.