alecjacobson / computer-graphics-bounding-volume-hierarchy

Computer Graphics Assignment about Bounding Volume Hierarchies
125 stars 46 forks source link

make - fatal error igl/opengl/glfw/viewer.h: No such file or directory #11

Closed edwardyliu closed 6 years ago

edwardyliu commented 6 years ago

I've been trying to compile the code in my home machine for some time now, but I couldn't find the appropriate package to install for "igl/opengl/glfw/viewer.h".

Attached below is the error message after make:

[ 41%] Built target glfw [ 46%] Built target glad [ 80%] Built target core [ 82%] Building CXX object CMakeFiles/rays.dir/rays.cpp.o In file included from /home/edwardyliu/Documents/projects/computer-graphics-bounding-volume-hierarchy/rays.cpp:9:0: /home/edwardyliu/Documents/projects/computer-graphics-bounding-volume-hierarchy/include/visualize_aabbtree.h:6:36: fatal error: igl/opengl/glfw/viewer.h: No such file or directory compilation terminated. CMakeFiles/rays.dir/build.make:62: recipe for target 'CMakeFiles/rays.dir/rays.cpp.o' failed make[2]: [CMakeFiles/rays.dir/rays.cpp.o] Error 1 CMakeFiles/Makefile2:107: recipe for target 'CMakeFiles/rays.dir/all' failed make[1]: [CMakeFiles/rays.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

Thank you!

edwardyliu commented 6 years ago

I tried again to compile it using the CDF computers, I got the same error message:

[ 82%] Building CXX object CMakeFiles/rays.dir/rays.cpp.o In file included from /h/u8/c8/01/liuedwa1/Desktop/projects/computer-graphics-bounding-volume-hierarchy/rays.cpp:9:0: /h/u8/c8/01/liuedwa1/Desktop/projects/computer-graphics-bounding-volume-hierarchy/include/visualize_aabbtree.h:6:36: fatal error: igl/opengl/glfw/viewer.h: No such file or directory compilation terminated. CMakeFiles/rays.dir/build.make:62: recipe for target 'CMakeFiles/rays.dir/rays.cpp.o' failed make[2]: [CMakeFiles/rays.dir/rays.cpp.o] Error 1 CMakeFiles/Makefile2:107: recipe for target 'CMakeFiles/rays.dir/all' failed make[1]: [CMakeFiles/rays.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

Please help!

edwardyliu commented 6 years ago

I dug around and found the file that was "missing":

wolf:~/Desktop/projects/computer-graphics-bounding-volume-hierarchy/libigl/include/igl/opengl/glfw$ ls -l -a total 72 drwx------ 3 liuedwa1 cstudent 4096 Oct 5 10:10 . drwx------ 3 liuedwa1 cstudent 4096 Oct 5 10:10 .. -rw------- 1 liuedwa1 cstudent 988 Oct 5 10:10 background_window.cpp -rw------- 1 liuedwa1 cstudent 777 Oct 5 10:10 background_window.h drwx------ 2 liuedwa1 cstudent 4096 Oct 5 10:10 imgui -rw------- 1 liuedwa1 cstudent 6793 Oct 5 10:10 map_texture.cpp -rw------- 1 liuedwa1 cstudent 1889 Oct 5 10:10 map_texture.h -rw------- 1 liuedwa1 cstudent 24438 Oct 5 10:10 Viewer.cpp -rw------- 1 liuedwa1 cstudent 6166 Oct 5 10:10 Viewer.h -rw------- 1 liuedwa1 cstudent 5191 Oct 5 10:10 ViewerPlugin.h

What should I do?

edwardyliu commented 6 years ago

It compiled when I changed:

"#include <igl/opengl/glfw/viewer.h>" to "#include <igl/opengl/glfw/Viewer.h>" in "include/visualize_aabbtree.h"

Is this an appropriate change to make?

velociraptor111 commented 6 years ago

wow that is so weird ... I have mine in lower case and it is working on my mac.

Out of curiosity , I tried cloning the repo and tried building the project in the UG machine at uoft and it has the same error as yours! but it is definitely working on my mac.

I'd suggest try running it and you should see a diagram pop up. If it does, then I suggest just keep on working so that you are not stuck on it until Professor Alec responds to this issue ....

edwardyliu commented 6 years ago

It ran: ray, distance, and intersection; different images popped up in all 3.

There were no errors though, just the image, which I'm not sure if it's suppose to be like this or not; since I didn't write any code at all yet.

velociraptor111 commented 6 years ago

Yes I think you are good then. The images should look something like in the readme.

Wow, sucks you have to go through this debugging man lol. Just curious, what machine are you using?

velociraptor111 commented 6 years ago

Found the culprit : https://stackoverflow.com/questions/1951951/when-including-header-files-is-the-path-case-sensitive

edwardyliu commented 6 years ago

yeah...I'm on Ubuntu....

Thank you for the help :)

alecjacobson commented 6 years ago

fixed in 1a38eae95ca192f4e810ca85c0aae4eb0bd1b74f