How to install glew on Codeblocks!
1. Download Glew from the internet or from here
! (this is win32 version working for all the IDE);
2. Extract it with Winrar!
3. Link it to Codeblocks:
- Open the Codeblocks
After you did that, go to Setting -> Compiler -> Search Directories -> Compiler -> Click ADD -> and Browse for the Extracted Glew Directory/include
- after you select the include directory, click ok.
After you did that, go to Setting -> Compiler -> Search Directories -> Linker -> Click ADD -> and Browse for the Extracted Glew Directory/lib
-after you select the lib directory, click ok.
After you did that, go to Settings -> Compiler -> Linker Settings -> Link Libraries -> Browse for the Extracted Glew Directory/lib
- select all the files in there, and then click OK button.
4. Before including glew.h to your source code, be sure you #define GLEW_STATIC
- when you include glew.h you would have to do it as follows:
5. Be sure you copy the content of Extracted Glew Directory/bin in the same place where your executable file is. In order to avoid getting the error glew.dll not found, etc.
- if you fail to link glew corectly you will receive compilations errors as follows:
undefined reference to 'glewInit@0'
undefined referece to 'glewInit'
glew.h "No such file in the directory"
undefined reference to '_imp_glewInit()'
- if you fail putting the dll files corectly, or if you put another version glew.dll, into your executable folder, you will receive an error as follows:
- in order to fix this error you have to install the right glew.dll into your computer, either in WINDOWS/System32 or in the same file with your created executable file.