libusb库用法 编译出错testlibusb.c:(.text+0xc): undefined reference to `usb_init'
2014-01-17 14:45
639 查看
编译应用程序出现如下错误:
/tmp/ccEM4ZMg.o: In function `main':
testlibusb.c:(.text+0xc): undefined reference to `usb_init'
testlibusb.c:(.text+0x11): undefined reference to `usb_find_busses'
testlibusb.c:(.text+0x16): undefined reference to `usb_find_devices'
testlibusb.c:(.text+0x1b): undefined reference to `usb_get_busses'
collect2: ld returned 1 exit status
英这样编译:
gcc testlibusb.c -o testusb -lusb
/tmp/ccEM4ZMg.o: In function `main':
testlibusb.c:(.text+0xc): undefined reference to `usb_init'
testlibusb.c:(.text+0x11): undefined reference to `usb_find_busses'
testlibusb.c:(.text+0x16): undefined reference to `usb_find_devices'
testlibusb.c:(.text+0x1b): undefined reference to `usb_get_busses'
collect2: ld returned 1 exit status
英这样编译:
gcc testlibusb.c -o testusb -lusb
相关文章推荐
- 解决DEV C++编译时出现的“ undefined reference to `___dyn_tls_init_callback'...”问题
- GCC编译程序出现 undefined reference to `std::ios_base::Init::Init()'问题
- FFmpeg编译出错undefined reference to `img_convert’的解决方法
- Linux下clang/gcc使用pthread.h编译出错undefined reference to `pthread_create'
- undefined reference to 'socket@12'编译socket出错codeblocks
- Qt交叉编译环境-undefined reference to `inotify_init1@GLIBC_2解决
- FFmpeg编译出错undefined reference to `img_convert’的解决方法
- qt+mingw编译出错,提示undefined reference to `**@**'
- FFmpeg编译出错undefined reference to `img_convert’的解决方法
- 编译出错libicui18n.so.58: undefined reference to `__cxa_throw_bad_array_new_length@CXXABI_1.3.8'
- ubuntu下 GCC编译程序出现 undefined reference to `std::ios_base::Init::Init()'问题
- 编译内核出错undefined reference to `__umoddi3'
- VIVADO中SDK新建工程编译出错——undefined reference to 'main'
- mingw编译x264 出错undefined reference to `__sync_add_and_fetch_4
- ubuntu下 GCC编译程序出现 undefined reference to `std::ios_base::Init::Init()'问题
- gsoap,openssl,onvif makefile编译,undefined reference to `soap_ssl_init',errno错误号500,401等
- ubuntu下 GCC编译程序出现 undefined reference to `std::ios_base::Init::Init()'问题
- ubuntu下 GCC编译程序出现 undefined reference to `std::ios_base::Init::Init()'问题
- 编译问题:undefined reference to `MyInitBitMap'
- 编译出错 "undefined reference to" .