Here is the code:
#define GLEW_STATIC
#include "GL/glew.h"
int main () {
glewExperimental = GL_TRUE;
return 0;
}
Here is the output:
Process finished with exit code -1073741515 (0xC0000135)
When the 'glewExperimental' line is commented out, program exits with 0.
Here is the CMake file (I am using CLion):
cmake_minimum_required(VERSION 2.8.4)
project(untitled)
add_definitions(-DGL_GLEXT_PROTOTYPES)
add_definitions(-DWINVER=0x0602)
add_definitions(-D_WIN32_WINNT=0x0602)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp)
add_executable(untitled ${SOURCE_FILES})
target_link_libraries(untitled glfw3 glew32 opengl32 gdi32)
I am using MinGW toolchain on Windows 8.1.
I compiled the GLEW library with the following bat file:
gcc -DGLEW_NO_GLU -O2 -Wall -W -Iinclude -DGLEW_BUILD -o src/glew.o -c src/glew.c
gcc -shared -Wl,-soname,libglew32.dll -Wl,--out-implib,lib/libglew32.dll.a -o lib/glew32.dll src/glew.o -L/mingw/lib -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
ar cr lib/libglew32.a src/glew.o
I placed the resulting libglew32.a, libglew32.dll.a in MinGW/lib folder.
I placed teh glew32.dll in Windows/System32 folder.
I placed the GL/glew.h, glxew.h, wglew.h in the MinGW/include folder.
What am I missing?
I cannot figure out why simply assigning a value to that variable throws an exception...