Error in installing GLEW library

241 views
Skip to first unread message

Mayuresh Bhosale

unread,
Jul 12, 2023, 1:21:30 PM7/12/23
to ProjectChrono
Hello,

I'm facing an error while building chrono with OpenGL. The error is with GLEW library and even if I have defined the path of GLEW library in the Cmake for Windows 64 bit, the error is persistent. 

Any leads to solve this issue would be appreciated.

==== Chrono OpenGL module ====


CMake Error at C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find GLEW (missing: GLEW_INCLUDE_DIRS GLEW_LIBRARIES)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.26/Modules/FindGLEW.cmake:238 (find_package_handle_standard_args)
src/chrono_opengl/CMakeLists.txt:42 (find_package)

Thomas LIANG

unread,
Jul 12, 2023, 6:19:43 PM7/12/23
to ProjectChrono
Hi Mayuresh,

How are you defining the variables in CMake? Any screenshots in ccmake or cmake gui would be helpful in debugging this problem.

Best,
Thomas

Mayuresh Bhosale

unread,
Jul 14, 2023, 9:16:20 AM7/14/23
to ProjectChrono
Hi Thomas,

I have attached a before and after screen capture of Cmake Gui. 
As instructed in installation, I'm defining the route to respective library directories. No error was shown for GLM and GLFW but the error was recorded for GLEW.
cmake_before.PNG
cmake_after.PNG

Thomas LIANG

unread,
Jul 14, 2023, 10:55:58 AM7/14/23
to ProjectChrono
Hi Mayuresh,

It seems like OpenGL was not properly installed on your computer. Please refer to these scripts: https://github.com/projectchrono/chrono/tree/main/contrib/build-scripts/opengl. (.bat since you're on Windows). Once you install OpenGL with the scripts, please link the {var}_DLL to the .dll files found inside OpenGL. The same thing applies to the include directory and lib folder.

Mayuresh Bhosale

unread,
Jul 16, 2023, 8:48:49 PM7/16/23
to ProjectChrono
Hi Thomas,

Thank you for your reply. 
I followed the steps from your email by running the OpenGL scripts to download libraries and build.
Although I was able to link the dll files to respective variables, I still got an error with the glew directory, as shown. (attached screen capture of CMake gui as well)

CMake Error at C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find GLEW (missing: GLEW_INCLUDE_DIRS GLEW_LIBRARIES)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.26/Modules/FindGLEW.cmake:238 (find_package_handle_standard_args)
src/chrono_opengl/CMakeLists.txt:42 (find_package)


cmake2.PNG

Thomas LIANG

unread,
Jul 17, 2023, 12:51:47 AM7/17/23
to ProjectChrono
Hi Mayuresh,

Unless you modified the build scripts, the default install directory should be in C:\Packages\gl. It seems like you're using the build folder of OpenGL, which is incorrect. Please use the install directory and try linking the dll, include, and directory there.

Best,
Thomas

Mayuresh Bhosale

unread,
Jul 18, 2023, 4:45:53 PM7/18/23
to ProjectChrono
Hi Thomas,

Thank you for your email, I was able to install all the packages and run chrono.

However, I'm having issues building the chrono with the Sensor module added to it.
The error I'm getting is associated with particle_writer.hpp and is as follows:

Error C1083 Cannot open include file: 'chrono_thirdparty/chpf/particle_writer.hpp': No such file or directory ChronoEngine_gpu C:\workspace\chrono\src\chrono_gpu\physics\ChSystemGpu_impl.cpp 30

I believe the error is associated as there is no particle_writer.hpp file in chrono_thirdparty folder.
Any leads would be helpful to resolve this error.

Warm regards,
Mayuresh

Thomas LIANG

unread,
Jul 18, 2023, 4:53:40 PM7/18/23
to ProjectChrono
Hi Mayuresh,

Please remember that the third party repositories are submodules. Use "git submodule init" and "git submodule update" to download these files.

Mayuresh Bhosale

unread,
Jul 20, 2023, 6:25:55 PM7/20/23
to ProjectChrono
Hi Thomas,

I have successfully installed the sensor module, however I'm unable to run all of the sensor demos with terminating midway.
One of the error was as attached with demo_SEN_Gator.exe 
Do you have any suggestions to resolve this error?
Error Sensor 2.PNG
Error Sensor.PNG

Radu Serban

unread,
Jul 21, 2023, 5:50:51 AM7/21/23
to ProjectChrono

Hi Mayuresh,

 

This was an issue with the Irrlicht run-time visualization which doesn’t deal properly with primitive shapes with more than 1 visual material.  The Chrono::Sensor demo you were trying to run defines 2 materials for the terrain patch (for the purpose of rendering with OptiX in Chrono::Sensor) but also creates an Irrlicht run-time visualization.

 

I pushed a fix to correct the assert you were hitting.  Please pull the latest Chrono code in the ‘main’ branch and try again.

 

Having said that, you are building and running Chrono demos in Debug mode (that assert would not be evaluated in Release mode and the code still works fine).

Unless you are trying to debug code or understand how Chrono works by stepping through it, I suggest you rebuild in Release mode – you will get a significant boost in performance.

 

--Radu

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/4917d838-7947-4eb4-b685-91547741afefn%40googlegroups.com.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages