Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mac 编译ncnn #91

Closed
ghost opened this issue Aug 11, 2017 · 2 comments
Closed

mac 编译ncnn #91

ghost opened this issue Aug 11, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Aug 11, 2017

mac编译ncnn出现这个问题,是什么原因呢
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libncnn.a(opencv.cpp.o) has no symbols

[ 93%] Linking CXX static library libncnn.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libncnn.a(opencv.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libncnn.a(opencv.cpp.o) has no symbols
[ 93%] Built target ncnn
Scanning dependencies of target ncnn2mem
[ 95%] Building CXX object tools/CMakeFiles/ncnn2mem.dir/ncnn2mem.cpp.o
[ 97%] Linking CXX executable ncnn2mem
[ 97%] Built target ncnn2mem
[100%] Linking CXX executable caffe2ncnn
[100%] Built target caffe2ncnn
➜ build git:(master) ✗ make install
[ 86%] Built target ncnn
[ 95%] Built target caffe2ncnn
[100%] Built target ncnn2mem
Install the project...
-- Install configuration: "release"
-- Installing: /Users/yangguangdejianjian/code/ncnn/build/install/lib/libncnn.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: /Users/yangguangdejianjian/code/ncnn/build/install/lib/libncnn.a(opencv.cpp.o) has no symbols
-- Installing: /Users/yangguangdejianjian/code/ncnn/build/install/include/blob.h
-- Installing: /Users/yangguangdejianjian/code/ncnn/build/install/include/cpu.h
-- Installing: /Users/yangguangdejianjian/code/ncnn/build/install/include/layer.h
-- Installing: /Users/yangguangdejianjian/code/ncnn/build/install/include/mat.h
-- Installing: /Users/yangguangdejianjian/code/ncnn/build/install/include/net.h
-- Installing: /Users/yangguangdejianjian/code/ncnn/build/install/include/opencv.h
-- Installing: /Users/yangguangdejianjian/code/ncnn/build/install/include/platform.h

@logic1988
Copy link

cmake 命令中增加 -DNCNN_OPENMP=OFF 参数, 否则会出现上面错误, 即使mac上已经安装了openmp版本的gcc

@nihui
Copy link
Member

nihui commented Sep 30, 2017

has no symbols 表示 opencv.cpp 里没有编译代码,因为 NCNN_OPENCV 默认是禁用的,这是正常现象

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants