gpt4 book ai didi

ios - 为 mac 编译 stasm

转载 作者:太空狗 更新时间:2023-10-29 11:15:34 26 4
gpt4 key购买 nike

我正在尝试在我的 mac 上构建 stasm 库,并希望将其移植到 iphone。stasm下载:http://www.milbo.users.sonic.net/stasm/download.html

我正在使用提供的 linux 生成文件。在对 header 进行一些更改后,包括 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: * No rule to make target -lm', needed bystasm'. Stop.

makefile 已更新

更新:

最终在 J-16 SDiZ 的帮助下修复了所有问题。

必须更新链接器标志,因为 opencv 更改了库名称

makefile 已更新以备不时之需

最佳答案

改变

INCL=\
-I$(OPENCV_HOME)/include/opencv\
-I../gsl\

INCL=\
-I$(OPENCV_HOME)/include/opencv\
-I$(OPENCV_HOME)/include \
-I../gsl\

并且您不应该在依赖项中使用 ${LIB}

改变

something: xxxxxx $(LIBS) $(OBJ)

something: xxxxxx $(OBJ)

我认为你应该了解 Makefile 的工作原理,这是一个 makefile 问题。

关于ios - 为 mac 编译 stasm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12857474/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com