firebreath 프레임 워크를 사용하여 작성한 작동 플러그인이 있습니다. MTP 읽기 쓰기 지원을 추가해야합니다.OSx에서 firebreath 프로젝트에 libmtp를 연결할 수 없습니다
일부 연구 후 나는 libmtp (http://libmtp.sourceforge.net/)에 착륙했습니다. 소스를 다운로드하여 예제를 실행하고 MTP 장치를 읽고 쓸 수있었습니다.
다음 Firebreath 플러그인 프로젝트에서이 lib를 사용하려고했습니다. 괜찮아요 컴파일 할 수 있지만 아래의 링커 오류가 발생합니다. libusb.a 및 libiconv.a 파일이있는 디렉토리를 검색 라이브러리 경로에 추가했습니다.
나는 또한 맥 포트 버전을노트 (sudo는 포트 + 보편적 libmtp 설치)를 사용하려고했습니다
: 당신이 libiconv 필요 libmtp 사용하고, libusb를 여기
를 설치 한 링커 오류가 있습니다 메신저에 xcode지고.
Undefined symbols for architecture i386:
"_libiconv", referenced from:
_ptp_unpack_string in libmtp.a(libmtp_la-ptp.o)
_ptp_pack_string in libmtp.a(libmtp_la-ptp.o)
_utf16_to_utf8 in libmtp.a(libmtp_la-unicode.o)
_utf8_to_utf16 in libmtp.a(libmtp_la-unicode.o)
"_libiconv_close", referenced from:
_LIBMTP_Release_Device in libmtp.a(libmtp_la-libmtp.o)
"_libiconv_open", referenced from:
_LIBMTP_Open_Raw_Device_Uncached in libmtp.a(libmtp_la-libmtp.o)
"_libusb_bulk_transfer", referenced from:
_ptp_write_func in libmtp.a(libmtp_la-libusb1-glue.o)
_ptp_usb_getdata in libmtp.a(libmtp_la-libusb1-glue.o)
_ptp_read_func in libmtp.a(libmtp_la-libusb1-glue.o)
_ptp_usb_event in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_claim_interface", referenced from:
_init_ptp_usb in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_clear_halt", referenced from:
_probe_device_descriptor in libmtp.a(libmtp_la-libusb1-glue.o)
_close_usb in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_close", referenced from:
_probe_device_descriptor in libmtp.a(libmtp_la-libusb1-glue.o)
_close_usb in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_control_transfer", referenced from:
_probe_device_descriptor in libmtp.a(libmtp_la-libusb1-glue.o)
_ptp_usb_control_cancel_request in libmtp.a(libmtp_la-libusb1-glue.o)
_init_ptp_usb in libmtp.a(libmtp_la-libusb1-glue.o)
_close_usb in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_detach_kernel_driver", referenced from:
_init_ptp_usb in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_free_config_descriptor", referenced from:
_probe_device_descriptor in libmtp.a(libmtp_la-libusb1-glue.o)
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_free_device_list", referenced from:
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_get_bus_number", referenced from:
_LIBMTP_Detect_Raw_Devices in libmtp.a(libmtp_la-libusb1-glue.o)
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_get_config_descriptor", referenced from:
_probe_device_descriptor in libmtp.a(libmtp_la-libusb1-glue.o)
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_get_device", referenced from:
_dump_usbinfo in libmtp.a(libmtp_la-libusb1-glue.o)
_get_playlist_extension in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_get_device_address", referenced from:
_LIBMTP_Detect_Raw_Devices in libmtp.a(libmtp_la-libusb1-glue.o)
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_get_device_descriptor", referenced from:
_probe_device_descriptor in libmtp.a(libmtp_la-libusb1-glue.o)
_LIBMTP_Detect_Raw_Devices in libmtp.a(libmtp_la-libusb1-glue.o)
_dump_usbinfo in libmtp.a(libmtp_la-libusb1-glue.o)
_get_playlist_extension in libmtp.a(libmtp_la-libusb1-glue.o)
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_get_device_list", referenced from:
_LIBMTP_Check_Specific_Device in libmtp.a(libmtp_la-libusb1-glue.o)
_LIBMTP_Detect_Raw_Devices in libmtp.a(libmtp_la-libusb1-glue.o)
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_get_string_descriptor_ascii", referenced from:
_probe_device_descriptor in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_init", referenced from:
_LIBMTP_Check_Specific_Device in libmtp.a(libmtp_la-libusb1-glue.o)
_LIBMTP_Detect_Raw_Devices in libmtp.a(libmtp_la-libusb1-glue.o)
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_kernel_driver_active", referenced from:
_probe_device_descriptor in libmtp.a(libmtp_la-libusb1-glue.o)
_dump_usbinfo in libmtp.a(libmtp_la-libusb1-glue.o)
_init_ptp_usb in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_open", referenced from:
_probe_device_descriptor in libmtp.a(libmtp_la-libusb1-glue.o)
_init_ptp_usb in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_release_interface", referenced from:
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
_close_usb in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_reset_device", referenced from:
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
_close_usb in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_set_debug", referenced from:
_LIBMTP_Check_Specific_Device in libmtp.a(libmtp_la-libusb1-glue.o)
_LIBMTP_Detect_Raw_Devices in libmtp.a(libmtp_la-libusb1-glue.o)
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
개념 증명을 위해 수동으로 xcode에 lib 검색 경로를 추가하고있었습니다. 나는 CMake를 통해 그들을 추가하려고합니다. 감사 – Joel
target_link_libraries ($ {PROJECT_NAME} /opt/local/lib/libmtp.a) target_link_libraries ($ {PROJECT_NAME} /opt/local/lib/libiconv.a) target_link_libraries ($ {PROJECT_NAME}/옵션/지방/lib 디렉토리 /libusb-1.0.a) 다시 한 번 부탁드립니다. – Joel
한 번의 호출로 실제로 그 작업을 수행 할 수 있습니다. 또한 find_library를 사용하여 다른 시스템에서 더 많이 사용하도록 허용하십시오. – taxilian