本文介绍了VC ++和libusb的未解析链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经整天试图在Visual Studio 2008项目中使用libusb.lib,但无法使其以任何方式工作.

我创建了一个clr控制台应用程序,将libusb.lib添加到了linker-> input-> additional依赖项. (该库也位于正确的目录中)

我已经将usb.h标头文件也放入了Visual Studio包含中.

Ii向库添加诸如usb_init()之类的调用的那一刻,它抱怨它是未解决的链接错误!

I''ve been trying all day now to use libusb.lib within a visual studio 2008 project and cannot get it to work in any way.

I''ve created a clr console application, added libusb.lib to linker->input->additional dependencies. (The lib is in the correct directory too)

I have placed the usb.h header file into visual studios includes as well.

The moment Ii add a call to the library such as usb_init(), it complains about it being an unresolved link error!

Error   1   error LNK2028: unresolved token (0A000012) "extern "C" void __cdecl usb_init(void)" (?usb_init@@$$J0YAXXZ) referenced in function "int __clrcall main(cli::array<class System::String ^ >^)" (?main@@$$HYMHP$01AP$AAVString@System@@@Z) **** YOU WINDOWS.obj




我已经有一段时间没有使用VC了,所以我很沮丧.




I haven''t used VC in quite some time now, so I am totally stumped.

推荐答案




这篇关于VC ++和libusb的未解析链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 11:00