DBUS
[DBUS] 에러해결: fatal error: gio/gunixfdlist.h: No such file or directory 17 | # include <gio/gunixfdlist.h>
2025. 11. 26. 00:09반응형
문제/에러
| : fatal error: gio/gunixfdlist.h: No such file or directory 17 | # include <gio/gunixfdlist.h> |
make 빌드 시 위의 에러가 나타남
원인
CMakeLists.txt 나 Makefile 안에 gio-unix-2.0 라이브러리를 include와 link 하지 않았기 때문.
(참고자료: https://stackoverflow.com/questions/63692782/how-to-properly-compile-and-link-a-gdbus-program)
해결방법
CMakeLists.txt 파일 안에 아래의 3줄이 있는지 확인한다. 즉 gio-unix-2.0을 include하고 link했는지 확인한다.
pkg_check_modules(GIO-UNIX gio-unix-2.0 REQUIRED)
include_directories(${GIO-UNIX_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} ${GIO-UNIX_LDFLAGS})
반응형
'DBUS' 카테고리의 다른 글
| [DBUS] gdbus-codegen을 활용한 기본 예제 - 2. cpp파일 포함하여 빌드 (0) | 2025.11.26 |
|---|---|
| [DBUS] gdbus-codegen 명령어에 대해 (0) | 2025.11.26 |
| [DBUS] Ubuntu에서 glib, gio 라이브러리 설치하기 (glib-2.0, gio-2.0) (0) | 2025.11.25 |
| [DBUS] gdbus-codegen을 활용한 기본 예제 (0) | 2025.11.25 |
| [D-BUS] method 기본 예제 (request/response) (0) | 2025.10.16 |
