我的问题是关于来自https://github.com/gphoto/libgphoto2/tree/master/examples的 gphoto2 中的 libgphoto2
我尝试编译“libgphoto2/examples/lunkwill-canon-capture.c”(基本上 libgphoto2/example 中的所有 .c 文件都显示相同的错误)
gcc -Wall -o TESTOUTPUT -lgphoto2 sample-trigger-capture.c (正如 libgphoto2 手册建议的那样)
我有错误
/tmp/ccg65O2b.o: In function `wait_event_and_download':
sample-trigger-capture.c:(.text+0xad): undefined reference to `gp_camera_wait_for_event'
sample-trigger-capture.c:(.text+0x371): undefined reference to `gp_camera_file_read'
sample-trigger-capture.c:(.text+0x57b): undefined reference to `gp_camera_file_delete'
/tmp/ccg65O2b.o: In function `main':
sample-trigger-capture.c:(.text+0x607): undefined reference to `sample_create_context'
sample-trigger-capture.c:(.text+0x64c): undefined reference to `gp_log_add_func'
sample-trigger-capture.c:(.text+0x658): undefined reference to `gp_camera_new'
sample-trigger-capture.c:(.text+0x66b): undefined reference to `gp_camera_init'
sample-trigger-capture.c:(.text+0x6db): undefined reference to `gp_camera_trigger_capture'
sample-trigger-capture.c:(.text+0x799): undefined reference to `gp_camera_exit'
collect2: error: ld returned 1 exit status
我做错了什么?此致