0
我使用的是C接口导入ml.h,我收到以下错误剪断,当我运行NDK建造时,我有“ml.h”:无法在Android的OpenCV的2.3
In file included from /Users/user/android-ndk-r7c/sources/cxx-stl/gnu-libstdc++/include/bits/stl_algobase.h:61,
from /Users/user/android-ndk-r7c/sources/cxx-stl/gnu-libstdc++/include/bits/stl_tree.h:62,
from /Users/user/android-ndk-r7c/sources/cxx-stl/gnu-libstdc++/include/map:60,
from /Users/user/android-opencv/OpenCV-2.3.1/share/OpenCV/../../include/opencv2/ml/ml.hpp:2022,
from /Users/user/android-opencv/OpenCV-2.3.1/share/OpenCV/../../include/opencv/ml.h:46,
from /Users/user/CarSafe/jni/blink_detection.c:7:
/Users/user/android-ndk-r7c/sources/cxx-stl/gnu-libstdc++/include/cstddef:51: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
如果我注释掉“ml.h”的include,它会编译好并正常运行。
问题是我想在我的C代码中使用opencv svm库。我究竟做错了什么?或者我应该将它编译为C++代码并在C++中使用ml.hpp头文件。这适用于项目中的其他代码。仔细在你的输出的最后一行