GL/glew.hをインクルードするプログラムでmakeエラーが出ます。OSはmac
です。
usr/local/Cellar/glew/2.1.0/include/GL/glew.h
と
usr/local/include/GL/glew.h
が見つかりましたが、
GL/glew.h not found
とエラーになります。
パスを通してみましたがうまくいきませんでした。
お心当たりのある方がいらっしゃいましたらご教授いただけますでしょうか。
よろしくお願いします。
情報が少なすぎて「心当たりのある方」がいないのだと思いますよ。エラー・メッセージの内容や行った対処を具体的にあるがまま記載した方が回答がつきやすいですよ。
Chironianさん、ありがとうございます。失礼いたしました。
https://github.com/uoip/pangolin
上記URLからインストールしたpangolinのビルドをしています。使用OSはmacOSです。
cmake .. はエラーなく通り、makeのところでエラーが出ています。
/anaconda3/pangolin/include/pangolin/display/attach.h:33:10: fatal error:
'GL/glew.h' file not found
#include <GL/glew.h>
8 warnings and 1 error generated.
make[2]: *** [python/CMakeFiles/pangolin.dir/pangolin.cpp.o] Error 1
make[1]: *** [python/CMakeFiles/pangolin.dir/all] Error 2
make: *** [all] Error 2
という内容です。
usr/local/Cellar/glew/2.1.0/include/GL/glew.h
usr/local/include/GL/glew.h
の2つにglew.hがあり、それぞれシンボリックとハードリンクになっているらしいので、/usr/local/Cellar/glew/2.1.0/includeにパスを通したのですがやはりエラーのままです。
よろしくお願いいたします。
I may be worried why you have said "usr/local/include/GL/glew.h" without slash in the beginning of the file path. Might be simply "/usr/local/..." (with leading slash), or else what you intend or mean something? Let me see several lines of an output by issuing "less /usr/local/include/GL/glew.h".
Thank you Stan_Dma.
Sorry for confusing you. There is the slash as you suggested like this:
/usr/local/include/GL $ ls
glew.h glxew.h wglew.h
/usr/local/Cellar/glew/2.1.0/include/GL $ ls
glew.h glxew.h wglew.h
Thank you for your kind support.
I dont have mac and also dont know about the hard or soft links around the include files. I am totally unsure but that links said above sounds like somewhat suspicious for me to work. Why not try again like the following command (again, after removing the build directory) without using links concerning about the glew includes and libraries?
mkdir build && cd build && \
cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DGLEW_INCLUDE_DIR=/usr/local/Cellar/glew/2.1.0/include \
-DGLEW_LIBRARY=/usr/local/Cellar/glew/2.1.0/lib64/libGLEW.so \
..
Replace the version and/or the library name to yours. Hope this help.
Thank you Stan_Dma,
I tried it. The folder has
/usr/local/Cellar/glew/2.1.0/lib $ ls
cmake libGLEW.2.1.dylib libGLEW.dylib
libGLEW.2.1.0.dylib libGLEW.a pkgconfig
so I changed as glew/2.1.0/lib/libGREW.a
but this did not work.
Thank you.
even if -DGLEW_LIBRARY=/usr/local/Cellar/glew/2.1.0/lib/libGLEW.dylib? Maybe typo "s/libGREW/libGLEW/"
Thank you.
Sorry for my typo. Actually cmake passes correctly,
but make -j4 causes error again.
Nothing more I have, except last thing I recommend is when you build, make -j1 should be safter than make -j<N> to avoid any annoyance causing problem in such a case.
Thank you Stan_Dma,
I will be trying to solve this problem.
I really appreciate your continuous help again and again.
回答1件
あなたの回答
tips
プレビュー