为mac编译stasm [英] compiling stasm for mac

查看:246
本文介绍了为mac编译stasm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm try to to build the stasm library on my mac and hopefully port it to the iphone. stasm download: http://www.milbo.users.sonic.net/stasm/download.html

我正在使用提供的linux的makefile。在对标题进行一些更改后,
包括libjpeg和opencv的路径,我遇到了这个错误

I am using the makefile for linux provided. after some changes to header include paths for libjpeg and opencv, I am stuck with this error

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

the original makefile is uploaded here https://github.com/tsaizhenling/stuff/blob/master/makefile

我试过更改目录,因为trojanfoe建议
但仍然是同样的错误:(

i have tried changing the directory as trojanfoe suggested but still same error :(

我有opencv和opencv2驻留在/ opt / local / include /

I have opencv and opencv2 residing in /opt/local/include/

更新:

尝试了J-16 SDiZ的建议,这让我前进了。我不得不删除迂腐的旗帜,但我仍然坚持以下错误

tried J-16 SDiZ's suggestion and this brought me forward. I had to remove the pedantic flag but i'm still stuck with the following error


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' ,需要 stasm'。停止。

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已更新

makefile is updated

更新:

最后在J-16 SDiZ的帮助下解决了所有问题。

Finally got everything fixed with help from J-16 SDiZ.

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

had to update the linker flags because opencv changed the library names

makefile在有人需要时更新

makefile is updated in case anyone needs it

推荐答案

更改

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问题。

I think you should learn how Makefile works, this is a makefile problem.

这篇关于为mac编译stasm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆