undefined reference to `major‘

简介: undefined reference to `major‘

具体错误:

/usr/bin/ld: udev/udevd.o: in function `static_dev_create_from_modules':
/home/quantum6/udev-167/udev/udevd.c:829: undefined reference to `makedev'
/usr/bin/ld: udev/udevd.o: in function `is_devpath_busy':
/home/quantum6/udev-167/udev/udevd.c:512: undefined reference to `major'
/usr/bin/ld: /home/quantum6/udev-167/udev/udevd.c:489: undefined reference to `major'

解决办法

在出错的文件中,加入以下代码:

#include <sys/types.h>
#include <sys/sysmacros.h>
目录
相关文章
|
Linux C语言 计算机视觉
OpenIN2 Linux 编译OpenCV 报错undefined reference to `xxx@xxx‘
OpenIN2 Linux 编译OpenCV 报错undefined reference to `xxx@xxx‘
329 0
OpenIN2 Linux 编译OpenCV 报错undefined reference to `xxx@xxx‘
|
Ubuntu C语言
【ubuntu】2.c:(.text+0xd2): undefined reference to `pthread_create‘ collect2: error: ld returned
【ubuntu】2.c:(.text+0xd2): undefined reference to `pthread_create‘ collect2: error: ld returned
145 0
undefined reference to `gdk_monitor_get_scale_factor/gtk_widget_get_scale_factor‘
undefined reference to `gdk_monitor_get_scale_factor/gtk_widget_get_scale_factor‘
93 0
|
C++
undefined reference to `vtable for XXX‘
undefined reference to `vtable for XXX‘
179 0
NDK编译doubango时出现错误:undefined reference to ‘stderr‘
NDK编译doubango时出现错误:undefined reference to ‘stderr‘
136 0
|
计算机视觉
交叉编译opencv:undefined reference to `png_riffle_palette_neon
交叉编译opencv:undefined reference to `png_riffle_palette_neon
199 0
undefined reference to `crypto_get_random'
undefined reference to `crypto_get_random'
85 0
undefined reference to `swr_init+
undefined reference to `swr_init+
111 0
|
4月前
|
存储 JavaScript 前端开发
成功解决:Cannot read properties of undefined (reading ‘commit‘)
这篇文章提供了解决Vuex中"Cannot read properties of undefined (reading 'commit')"错误的两种方法:检查模板中的数据属性是否存在,以及确保在Vue实例中正确挂载了store对象。
成功解决:Cannot read properties of undefined (reading ‘commit‘)