我正在尝试在我的 mac 上构建 stasm 库,并希望将其移植到 iphone。stasm 下载: http: //www.milbo.users.sonic.net/stasm/download.html
我正在使用为 linux 提供的 makefile。在对标头进行一些更改后,包括 libjpeg 和 opencv 的路径,我遇到了这个错误
g++ -c ../stasm/violajones.cpp -O3 -Wall -pedantic -I/home/john/OpenCV-2.1.0/include/opencv -I../gsl -I../gsl/gsl -I../image -I../jpeg -I../mat -I../rowley -I../stasm -I../tasm
In file included from ../stasm/violajones.cpp:24:
/opt/local/include/opencv/cv.h:63:33: error: opencv2/core/core_c.h: No such file or directory
/opt/local/include/opencv/cv.h:64:33: error: opencv2/core/core.hpp: No such file or directory
/opt/local/include/opencv/cv.h:65:39: error: opencv2/imgproc/imgproc_c.h: No such file or directory
/opt/local/include/opencv/cv.h:66:39: error: opencv2/imgproc/imgproc.hpp: No such file or directory
/opt/local/include/opencv/cv.h:67:38: error: opencv2/video/tracking.hpp: No such file or directory
/opt/local/include/opencv/cv.h:68:45: error: opencv2/features2d/features2d.hpp: No such file or directory
/opt/local/include/opencv/cv.h:69:35: error: opencv2/flann/flann.hpp: No such file or directory
/opt/local/include/opencv/cv.h:70:39: error: opencv2/calib3d/calib3d.hpp: No such file or directory
/opt/local/include/opencv/cv.h:71:43: error: opencv2/objdetect/objdetect.hpp: No such file or directory
/opt/local/include/opencv/cv.h:72:37: error: opencv2/legacy/compat.hpp: No such file or directory
/opt/local/include/opencv/cv.h:79:37: error: opencv2/core/internal.hpp: No such file or directory In file included
from ../stasm/violajones.cpp:25:
/opt/local/include/opencv/highgui.h:47:39: error: opencv2/highgui/highgui_c.h: No such file or directory
/opt/local/include/opencv/highgui.h:48:39: error: opencv2/highgui/highgui.hpp: No such file or directory
原始makefile在这里上传https://github.com/tsaizhenling/stuff/blob/master/makefile
我已尝试按照 trojanfoe 的建议更改目录,但仍然出现相同的错误:(
我有 opencv 和 opencv2 位于 /opt/local/include/
更新:
尝试了 J-16 SDiZ 的建议,这让我前进了。我不得不删除迂腐标志,但我仍然遇到以下错误
g++ -c ../stasm/tab.cpp -O3 -Wall -I/opt/local/include/opencv -I/opt/local/include -I../gsl -I../gsl/gsl -I. ./image -I../jpeg -I../mat -I../rowley -I../stasm -I../tasm make: *没有规则来制作目标
-lm', needed by
stasm'。停止。
生成文件已更新
更新:
终于在 J-16 SDiZ 的帮助下解决了所有问题。
必须更新链接器标志,因为 opencv 更改了库名称
如果有人需要,makefile 会更新