2014-06-05 280 views
-1

我在Windows 7 64bit使用VS2013使用libusb,我看了這個題目http://www.dreamincode.net/forums/topic/148707-introduction-to-using-libusb-10/page__hl__USB
並嘗試編譯它VS2013,但我有問題。
以下是編譯錯誤消息:在Visual Studio 2013

Error 12 error LNK1120: 8 unresolved externals C:\Users\HoangNam\Documents\Visual Studio 2013\Projects\LIBUSB\Debug\LIBUSB.exe LIBUSB 

Error 4 error LNK2019: unresolved external symbol [email protected] referenced in function _wmain C:\Users\HoangNam\Documents\Visual Studio 2013\Projects\LIBUSB\LIBUSB\LIBUSB.obj LIBUSB 

Error 5 error LNK2019: unresolved external symbol [email protected] referenced in function _wmain C:\Users\HoangNam\Documents\Visual Studio 2013\Projects\LIBUSB\LIBUSB\LIBUSB.obj LIBUSB 

Error 6 error LNK2019: unresolved external symbol [email protected] referenced in function _wmain C:\Users\HoangNam\Documents\Visual Studio 2013\Projects\LIBUSB\LIBUSB\LIBUSB.obj LIBUSB 

Error 7 error LNK2019: unresolved external symbol [email protected] referenced in function _wmain C:\Users\HoangNam\Documents\Visual Studio 2013\Projects\LIBUSB\LIBUSB\LIBUSB.obj LIBUSB 
Error 8 error LNK2019: unresolved external symbol [email protected] referenced in function _wmain C:\Users\HoangNam\Documents\Visual Studio 2013\Projects\LIBUSB\LIBUSB\LIBUSB.obj LIBUSB 

Error 9 error LNK2019: unresolved external symbol [email protected] referenced in function "void __cdecl printdev(struct libusb_device *)" ([email protected]@[email protected]@@Z) C:\Users\HoangNam\Documents\Visual Studio 2013\Projects\LIBUSB\LIBUSB\LIBUSB.obj LIBUSB 

Error 10 error LNK2019: unresolved external symbol [email protected] referenced in function "void __cdecl printdev(struct libusb_device *)" ([email protected]@[email protected]@@Z) C:\Users\HoangNam\Documents\Visual Studio 2013\Projects\LIBUSB\LIBUSB\LIBUSB.obj LIBUSB 

Error 11 error LNK2019: unresolved external symbol [email protected] referenced in function "void __cdecl printdev(struct libusb_device *)" ([email protected]@[email protected]@@Z) C:\Users\HoangNam\Documents\Visual Studio 2013\Projects\LIBUSB\LIBUSB\LIBUSB.obj LIBUSB 

我想我需要鏈接usblib到我的項目,但我不知道該怎麼做。
請幫助我:(

+0

難道你應該包括正確的libusb.lib? –

+0

應該包含像:項目屬性 - >連接器 - >輸入[其他依賴項] – Andro

+0

我在libusb 1.0.18文件夾中找不到libusb.lib,所以我不能包含它 – HoangNam

回答

2

解決方案必須從msvc文件夾中打開和建造。然後會有你需要.lib & .dll文件。將其複製到項目文件夾,並添加像穿心蓮內酯說,它的工作原理。