GLEW with CMake in CLion crashes application (MinGW)

I am trying now for 3 days to get GLEW working in my simple Project.

After building the application it crashes instantly with this error:

Process finished with exit code -1073741515 (0xC0000135)

I build a simple window with a rectangle inside it (with GLFW). Everything works.
When I then add GLEW, it crashes:


if (glewInit() == GLEW_OK) {
    std::cout << "Could not initialize Glew!" << std::endl;
    return false;
}

I compiled the libraries by myself and I also tried the pre-compiled libraries from the website.
Here my whole Project on Github

I use MinGW 32 bit, Windows 7, CLion 2018.1 and CMake 3.10.2
I prefer using static libraries, therefore I linked the libglew32.a and libglew32dll.a

Any help is appreciated. Thank you in advance!

Haven’t looked at your code so far and I didn’t link glew as a static lib for a while, but I am pretty sure, that they mention somewhere on there homepage that you have to add a #define if you want to build glew as static lib:

http://glew.sourceforge.net/install.html

A sentence from the linked page:

On Windows, you also need to define the GLEW_STATIC preprocessor token when building a static library or executable,…

Maybe you messed something up there. Just read what they write about static building and linking. If that is not the problem and I have the time, I ll check your Repo.