[QUOTE=mhagain;1283370]If the libs were incompatible with your build environment it would fail to link.
Here’s a useful tip: in at least 99% of cases if you’re thinking “it’s my build environment”, or “it’s my libs”, or “it’s my OS”, or “it’s my driver”, it’s actually not: it’s your code.
In this case the most likely cause of GLEW failing to initialize is that you’re calling glewInit before you’ve created your OpenGL context. Review your code, check that this isn’t the case, and post back.[/QUOTE]
Thanks for your response Mhagain, but didn’t call glewInit before creating the OpenGL context.
if (m_useOpenGL) {
glfwMakeContextCurrent(m_win);
glewExperimental = true;
GLenum glewinit = glewInit();
if (glewinit != GLEW_OK) {
fprintf(stderr, "Error: %s
", glewGetErrorString(glewinit)); // Prints:
throw std::runtime_error("**** Failed To Initialize GLEW ****
");
}
}
I’ve googled this issue very intensely and a lot of the search results suggested what you mentioned.
I’m definitely doing something wrong, I agree, but specifically due to not knowing how to use cmake to build GLEW. At least that’s what I think is going on. I honestly don’t have the slightest idea how to use cmake to build GLEW for mingw-w64. You can find tutorials for mingw (32bit), or Visual Studio, but I fail to find one for mingw-w64 using the MS command prompt.
As I mentioned in my opening post, I’m linking against pre-compiled libs that apparently work only for Visual Studio. I have to learn how to compile my own using the source code, and I don’t know how to do that for GLEW. I’m very confused. Unless there’s another solution, or I’m horrible searching on Google
Edit:
GLEW’s github page offers atutorial for MSYS2, but unfortunately I’d need the system admin’s pw to install MSYS2 on to this computer, which is why I’m desperately looking for a simple solution using only cmake and the command prompt.