반응형

 

문제/에러

: 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})

 

반응형