我正在尝试用Caffe做一个CMake,但我的系统找不到protobuf编译器.我以前安装了protobuf2.7.0.现在我切换回2.6.1.如何配置我的CMake以识别protobuf2.6.1编译器?
我已经做好了
$ sudo apt-get install libprotobuf-dev protobuf-compiler
$ protoc --version
libprotoc 2.6.1
Run Code Online (Sandbox Code Playgroud)
但是当我尝试cofke Caffe时,它仍然给我错误
user@user-computer:~/caffe/build$ cmake -DBLAS=open ..
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- system
-- thread
-- filesystem
-- chrono
-- date_time
-- atomic
-- Found gflags (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so)
-- Found glog (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libglog.so)
CMake Error at cmake/ProtoBuf.cmake:13 (message):
Could not find PROTOBUF Compiler
Call Stack (most recent call first):
cmake/Dependencies.cmake:43 (include)
CMakeLists.txt:46 (include)
-- Configuring incomplete, errors occurred! …Run Code Online (Sandbox Code Playgroud) 我正在尝试将我的网络摄像头与OpenCV结合使用来运行我的应用程序。但是,当我尝试使用videoCapture获取帧时,它给了我这个错误。
视频错误:V4L2:OpenCV示例不支持输入图像的像素格式:../test/test.cpp:3331
检查问题后,一些建议说要使用此命令来运行应用程序
LD_PRELOAD="/usr/lib/libv4l/v4l2convert.so" ./MY-APP
Run Code Online (Sandbox Code Playgroud)
但我在系统/usr/lib/libv4l/v4l2convert.so中没有此库文件
我不确定在哪里可以得到这个库,或者它是OpenCV附带的?
谢谢
编辑:也尝试过
sudo apt-get install libv4l-0
[sudo] password for nvidia:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libv4l-0 is already the newest version (1.10.0-1).
libv4l-0 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Run Code Online (Sandbox Code Playgroud) 使用Boost for Android和 Android Studio ndk编译我的代码时遇到问题。我正在使用 boost 中的库 libboost_filesystem-clang-mt-a32-1_66.a 之一,但是,它显示以下错误:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:externalNativeBuildDebug'.
> Build command failed.
Error while executing process /home/user/Android/Sdk/cmake/3.6.4111459/bin/cmake with arguments {--build /home/user/git/project/app/.externalNativeBuild/cmake/debug/armeabi-v7a --target native-lib}
[1/2] Building CXX object CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
[2/2] Linking CXX shared library ../../../../build/intermediates/cmake/debug/obj/armeabi-v7a/libnative-lib.so
FAILED: : && /home/user/Downloads/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/home/user/Downloads/android-ndk-r16b/sysroot -fPIC -isystem /home/user/Downloads/android-ndk-r16b/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=23 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -mfpu=neon -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -Wno-error=format-security -fpermissive -fopenmp …Run Code Online (Sandbox Code Playgroud)