0
我的問題是有關從https://github.com/gphoto/libgphoto2/tree/master/examples未定義的引用而編譯libgphoto2 /例子
在gphoto2 libgphoto2我嘗試編譯「libgphoto2 /例子/ lunkwill,佳能的capture.c」(在libgphoto2 /例如基本上所有.c文件顯示相同的錯誤)
GCC -Wall -o TESTOUTPUT -lgphoto2採樣觸發的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
我做錯了什麼?你錯過了 問候