Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix "Could NOT find GLEW (missing: GLEW_INCLUDE_DIR GLEW_LIBRARY)"

Tags:

cocos2d-x

It appears you are building natively for Linux with GCC

Cocos2dx on Linux : "cmake -G 'CodeBlocks - Unix Makefiles'
-- OpenGL include dirs: /usr/include
CMake Error at /usr/local/share/cmake-3.4/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find GLEW (missing: GLEW_INCLUDE_DIR GLEW_LIBRARY)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.4/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake-3.4/Modules/FindGLEW.cmake:44 (find_package_handle_standard_args)
  cocos2d/cmake/Modules/CocosBuildHelpers.cmake:44 (find_package)
  cocos2d/CMakeLists.txt:190 (cocos_find_package)

-- Configuring incomplete, errors occurred!
See also "/home/daw/Dev/cocos2d-x-3.9/allProject/testC/CMakeFiles/CMakeOutput.log".
like image 649
huudiep Avatar asked Dec 11 '15 19:12

huudiep


1 Answers

Download The OpenGL Extension Wrangler Library and add include and lib path in cmake project file.

For example:

set(GLEW_INCLUDE_DIR, "/glew-2.0.0/include/")
set(GLEW_LIBRARY, "/glew-2.0.0/lib")

Hope this helps.

like image 188
Satya Avatar answered Nov 12 '22 11:11

Satya