After struggling of trying to compile the original codes on Windows, I decided to transfer to Ubuntu. Since I had no experience on CG programming (I took the CG course in my undergraduate but it required no coding workload), I found a tutorial online to follow. After following the step of “Building on Linux”, when I start running “cmake ..”, the terminal threw out several errors:
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) -- Using X11 for window creation -- Using GLX for context creation CMake Error at external/glfw-3.1.2/CMakeLists.txt:278 (message): The Xinerama library and headers were not found
I googled it. Since I had little experience on Linux system, I totally had no idea what could I do. What it said online is to install a lacking library:
sudo apt-get install libxinerama-dev
Well, it seems the tutorial forgot to mention about that. Then I tried to build again but it kept throwing errors:
CMake Error at external/glfw-3.1.2/CMakeLists.txt:324 (message): The Xcursor libraries and headers were not found
With the experience above, I guessed I had figured out what should I do. Notice that the way to install is adding “lib” in front of the name of the library, I tried install another one:
sudo apt-get install libxcursor-dev
It worked! However there was still one problem:
CMake Error at CMakeLists.txt:24 (cmake_policy): Policy "CMP0026" is not known to this version of CMake.
OK. It seems different from the previous problems. I found the way to figure it out from here. It was just a matter of editing 1 line of code in CMakeList.txt file.
There you go! When it succeeded it should be shown on screen like:
-- Using X11 for window creation -- Using GLX for context creation -- Configuring done -- Generating done -- Build files have been written to: /home/hilllo/CMU15-662/ogl-OpenGL-tutorial_0015_33/build