我的程序调用了USB厂商提供的程序库,包括一个xxx.h的文件和一个xxx.lib的文件。我尝试使用 -lxxx 将这个库连接进我的工程,但却报错说我所调用的函数是undefined reference
我以前使用另一个公司的动态库,含有yyy.h,yyy.lib和yyy.dll。是动态库,我用上述方法连接成功。运行时需要yyy.dll,但,现在应该使用的是静态库了,不知道我应该使用什么方式连接这个文件。
谁有此方面的经验吗?谢谢指导一下。
连接第三方静态库德问题? Topic is solved
连接第三方静态库德问题?
*** china ***
xxx.lib看起来像VC的库文件,但你的-lxxx看起来像gcc的选项,意味着libxxx.a。可能是这个问题。
你用的是什么编译器?
-Utensil
你用的是什么编译器?
-Utensil
In fascination of creating worlds by words, and in pursuit of words behind the world.
On Github: http://utensil.github.com
Technical Blog in Chinese: http://utensil.iteye.com/
On Github: http://utensil.github.com
Technical Blog in Chinese: http://utensil.iteye.com/
不同编译器编译出来的库的binary级的兼容,估计是相当难的...所幸楼主已经找到了开源的相应库,开源的东西最好用...
-Utensil
-Utensil
In fascination of creating worlds by words, and in pursuit of words behind the world.
On Github: http://utensil.github.com
Technical Blog in Chinese: http://utensil.iteye.com/
On Github: http://utensil.github.com
Technical Blog in Chinese: http://utensil.iteye.com/