无法安装 UVC 驱动程序:“函数‘x’的隐式声明 [-Werror=implicit-function-declaration]”

无法安装 UVC 驱动程序:“函数‘x’的隐式声明 [-Werror=implicit-function-declaration]”

我正在为我的毕业设计做一个项目,其中涉及使用网络摄像头。我买了一个外置摄像头并尝试为其安装新驱动程序。现在我的集成网络摄像头无法工作。

我的网络摄像头是 Acer 水晶眼。

我已尝试按照以下步骤重新安装 UVC 驱动程序:

git clone git://linuxtv.org/media_build.git
cd media_build
./build

但是我在构建过程中收到以下错误:

/home/tom/Downloads/media_build/v4l/mt9p031.c: In function 'mt9p031_clk_setup':
/home/tom/Downloads/media_build/v4l/mt9p031.c:226:2: error: implicit declaration of function 'devm_clk_get' [-Werror=implicit-function-declaration]
/home/tom/Downloads/media_build/v4l/mt9p031.c:226:15: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/tom/Downloads/media_build/v4l/mt9p031.c: In function 'mt9p031_power_on':
/home/tom/Downloads/media_build/v4l/mt9p031.c:287:3: error: implicit declaration of function 'clk_prepare_enable' [-Werror=implicit-function-declaration]
/home/tom/Downloads/media_build/v4l/mt9p031.c: In function 'mt9p031_power_off':
/home/tom/Downloads/media_build/v4l/mt9p031.c:310:3: error: implicit declaration of function 'clk_disable_unprepare' [-Werror=implicit-function-declaration]
/home/tom/Downloads/media_build/v4l/mt9p031.c: In function 'mt9p031_probe':
/home/tom/Downloads/media_build/v4l/mt9p031.c:961:2: error: implicit declaration of function 'devm_regulator_get' [-Werror=implicit-function-declaration]
/home/tom/Downloads/media_build/v4l/mt9p031.c:961:15: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/tom/Downloads/media_build/v4l/mt9p031.c:962:15: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/tom/Downloads/media_build/v4l/mt9p031.c:963:18: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/tom/Downloads/media_build/v4l/mt9p031.c:1035:3: error: implicit declaration of function 'devm_gpio_request_one' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [/home/tom/Downloads/media_build/v4l/mt9p031.o] Error 1
make[2]: *** [_module_/home/tom/Downloads/media_build/v4l] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-3.2.0-40-generic'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/tom/Downloads/media_build/v4l'
make: *** [all] Error 2
build failed at ./build line 452.

如果有人能帮忙我将非常感激因为我没有太多时间来完成这个项目!

答案1

您看到的错误是由您使用站点上的 git clone 命令获取的 C++ 源代码引起的。它们有一个固有的错误(隐式函数声明),因此您应该针对该包提交错误报告。您可以尝试Makefile在 gedit 中编辑,或者如果build是 shell 脚本,则编辑它以-Werror=implicit-function-declaration从任何命令中删除。

相关内容