libfreenect(OpenKinect 库)的 VS2010 编译错误
我正在安装 libfreenect
(OpenKinect
) 以将 Kinect
与 Arduino
连接起来,以实现 Windows 7 上的有形媒体项目。我陷入了编译阶段 在 VS2010 中,有 61 个此类错误。
Error 1 error LNK2019: unresolved external symbol __imp___glutInitWithExit referenced in function glutInit_ATEXIT_HACK C: \Users\Laptop\Downloads\OpenKinect Drivers\OpenKinect- libfreenect-3b0f416\examples\glview.obj glview
完整列表在这里: http://goo.gl/EOrQQ
这是 CMAKE 设置的快照: http://goo.gl/uapTS
我见过有类似错误的帖子,但还没有找到已知的错误 决议,任何帮助将不胜感激。
I'm installing libfreenect
(OpenKinect
) to interface the Kinect
with Arduino
for a
tangible media project on Windows 7. I'm stuck at the compiling stage
in VS2010 with 61 errors of this type.
Error 1 error LNK2019: unresolved external symbol __imp___glutInitWithExit referenced in function glutInit_ATEXIT_HACK C: \Users\Laptop\Downloads\OpenKinect Drivers\OpenKinect- libfreenect-3b0f416\examples\glview.obj glview
Full list here:
http://goo.gl/EOrQQ
Here is a snapshot of CMAKE settings:
http://goo.gl/uapTS
I have seen posts with similar errors but haven't found a known
resolution, any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在一般情况下,未解析的外部符号意味着您有一个没有声明的符号的定义。这通常可以通过将适当的 .lib 或 dll 文件添加到链接器导入中来解决。
in the general case unresolved external symbol means you have a definition for a symbol that there is no declaration for. This is usually solved by adding the appropriate .lib or dll file to your linker imports.
我知道这个问题是两年前提出的,但我也遇到了同样的问题,也许其他人会发现它很有帮助:
至于版本1.2.5.0及更高版本的“libusb-win32”库,包含文件的名称已更改,我复制了“lusb0_usb.h”头文件并将其命名为“ usb.h”并将其复制到Windows的“system32”文件夹和Visual Studio的“VC/include”文件夹中。
还要注意提供“glut32.h”的正确路径(而不是“../include/GL”)并复制“glut32.dll”以及“phtreadVC2.dll”到“system32”文件夹。
这是我的“cmake”配置:
在构建“libfreenect.sln”项目,它运行得很好,我可以运行这些示例。
I know that the question was asked two years ago, but I struggled with the same problem, too and perhaps others will find it helpful:
As for the version 1.2.5.0 and higher of the "libusb-win32"-library the name of the include files changed, I made a copy of the "lusb0_usb.h" header file and named it "usb.h" and copied it to the "system32" folder of Windows and the "VC/include" folder of Visual Studio.
And also be careful that you supply the right path to the "glut32.h" (NOT "../include/GL") and copy the "glut32.dll" and the "phtreadVC2.dll" to the "system32" folder, too.
Here is my "cmake" configuration:
After I build the "libfreenect.sln" project, it worked quite well and I could run the examples.