Closed Adhders closed 5 years ago
咱们这个readme 文件应该添加下运行的指令
I actually have some other problem when compiling the code.
g++ -c facedetectcnn.cpp -o facedetectcnn.o
facedetectcnn.cpp: In function ‘float dotProductFloatChGeneral(float*, float*, int, int)’:
facedetectcnn.cpp:102:39: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
__m256 sumvec = _mm256_setzero_ps();
^
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include/immintrin.h:41:0,
from facedetectcnn.h:41,
from facedetectcnn.cpp:26:
/usr/lib/gcc/x86_64-linux-gnu/5/include/avxintrin.h:1202:1: error: inlining failed in call to always_inline ‘__m256 _mm256_setzero_ps()’: target specific option mismatch
_mm256_setzero_ps (void)
^
facedetectcnn.cpp:102:38: error: called from here
__m256 sumvec = _mm256_setzero_ps();
^
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include/immintrin.h:79:0,
from facedetectcnn.h:41,
from facedetectcnn.cpp:26:
/usr/lib/gcc/x86_64-linux-gnu/5/include/fmaintrin.h:63:1: error: inlining failed in call to always_inline ‘__m256 _mm256_fmadd_ps(__m256, __m256, __m256)’: target specific option mismatch
_mm256_fmadd_ps (__m256 __A, __m256 __B, __m256 __C)
^
facedetectcnn.cpp:114:33: error: called from here
sumvec = _mm256_fmadd_ps(avec, bvec, sumvec);
^
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include/immintrin.h:41:0,
from facedetectcnn.h:41,
from facedetectcnn.cpp:26:
/usr/lib/gcc/x86_64-linux-gnu/5/include/avxintrin.h:846:1: error: inlining failed in call to always_inline ‘__m256 _mm256_load_ps(const float*)’: target specific option mismatch
_mm256_load_ps (float const *__P)
^
facedetectcnn.cpp:107:38: error: called from here
bvec = _mm256_load_ps(p2 + i);
^
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include/immintrin.h:41:0,
from facedetectcnn.h:41,
from facedetectcnn.cpp:26:
/usr/lib/gcc/x86_64-linux-gnu/5/include/avxintrin.h:846:1: error: inlining failed in call to always_inline ‘__m256 _mm256_load_ps(const float*)’: target specific option mismatch
_mm256_load_ps (float const *__P)
^
facedetectcnn.cpp:106:38: error: called from here
avec = _mm256_load_ps(p1 + i);
^
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include/immintrin.h:41:0,
from facedetectcnn.h:41,
from facedetectcnn.cpp:26:
/usr/lib/gcc/x86_64-linux-gnu/5/include/avxintrin.h:258:1: error: inlining failed in call to always_inline ‘__m256 _mm256_hadd_ps(__m256, __m256)’: target specific option mismatch
_mm256_hadd_ps (__m256 __X, __m256 __Y)
^
facedetectcnn.cpp:118:28: error: called from here
sumvec = _mm256_hadd_ps(sumvec, sumvec);
^
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include/immintrin.h:41:0,
from facedetectcnn.h:41,
from facedetectcnn.cpp:26:
/usr/lib/gcc/x86_64-linux-gnu/5/include/avxintrin.h:258:1: error: inlining failed in call to always_inline ‘__m256 _mm256_hadd_ps(__m256, __m256)’: target specific option mismatch
_mm256_hadd_ps (__m256 __X, __m256 __Y)
^
facedetectcnn.cpp:119:28: error: called from here
sumvec = _mm256_hadd_ps(sumvec, sumvec);
@Mark Same error here
same erro
@mark Same error here
you should add like this :QMAKE_CXXFLAGS += "-mavx" QMAKE_CXXFLAGS += "-mfma",when you compile.emmm,I use Qt + CMake.I hope to help you.
那个方法好像没有实现吧,所以报错了
@Adhders @MarkMa1990 @daixiangzi I have met the same issue.
Solved by add -L./ -lfacedetection to point out the library we want to link.
g++ libfacedetectcnn-example.cpp -L./ -lfacedetection -Wl,-rpath=. pkg-config --cflags --libs opencv
-o facedetect
pls have a try, good luck.
@Adhders @MarkMa1990 @daixiangzi I have met the same issue. Solved by add -L./ -lfacedetection to point out the library we want to link. g++ libfacedetectcnn-example.cpp -L./ -lfacedetection -Wl,-rpath=.
pkg-config --cflags --libs opencv
-o facedetect pls have a try, good luck.
what is -lfacedetection?
/usr/bin/ld: 找不到 -lfacedetection collect2: error: ld returned 1 exit status
咱们这个readme 文件应该添加下运行的指令
请问下 这个问题最后怎么解决的。谢谢大佬~
我在Ubantu上运行g++ libfacedetectcnn-example.cpp ./test.jpg -O3
pkg-config --libs --cflags opencv4
undefined reference to `facedetect_cnn(unsigned char, unsigned char, int, int, int)', 我已经加头文件了啊