0

Environment

  • Windows 10 version 1903, 64bit
  • Eigen 3.3.7
  • freeglut 3.2.1
  • Visual Studio 2015 Update 3

When I run the following cmake command to build Eigen3:

cmake -DCMAKE_CONFIGURATION_TYPES=Release -DPKG_CONFIG_EXECUTABLE=D:\3rd-parties\pkg-config.exe -DGLUT_glut_LIBRARY=D:\3rd-parties\freeglut-3.2.1\install\lib\freeglut.lib -G"Visual Studio 14 2015 Win64" ..

, Eigen3 always complains:

-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY)

even though I have correctly set the GLUT_glut_LIBRARY variable. I'm sure freeglut 3.2.1 was correctly built under Release mode in VS2015 and the path is specified without any problem. So, how to have Eigen3 work with freeglut, or Eigen3 does not work with freeglut at all, but only with the old legacy GLUT? Besides, does Eigen use or depend on GLUT? If not, I may just safely ignore this error. Thank you.

user5280911
  • 723
  • 1
  • 8
  • 21
  • 2
    "does Eigen use or depend on GLUT?" - [Like with QT](https://stackoverflow.com/questions/58177083/found-unsuitable-qt-version-5-12-4-from-c-qt-5-12-4-msvc2015-64-bin-qmake-exe), Eigen by itself doesn't depend from GL, this library is used only for examples. – Tsyvarev Oct 01 '19 at 14:14
  • Thanks. I will ignore the error. But I can't help ask one more question. Since I have specified GLUT_glut_LIBRARY, why did Eigen example still report "Could NOT find GLUT"? Is it because the example does not work with freeglut, but only with legacy glut32.lib? – user5280911 Oct 01 '19 at 14:42
  • 1
    The phrase `missing: FOO` doesn't mean that setting variable `FOO` will help "Find" script to locate the package. You need to check documentation for that script, exactly it describes how to help the script. But there are common ways, which work with almost any "Find" script. In your case, you may try to pass option `-DCMAKE_PREFIX_PATH=D:\3rd-parties\freeglut-3.2.1\install` to `cmake`. – Tsyvarev Oct 01 '19 at 21:49

0 Answers0