Visual Studio:从win32更改为x64时,显示链接错误 [英] Visual Studio : when changed from win32 to x64, its showing linking error

查看:265
本文介绍了Visual Studio:从win32更改为x64时,显示链接错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码在基于Win32的应用程序中运行良好.最近我将其更改为x64,出现错误并说无法打开glut32.lib".然后我在其他依赖项上添加了glut32.lib,但出现了这些链接错误现在.

My code was working fine when it was in win32 based application.Recently i changed it to x64 error came up and it said "cannot open glut32.lib".Then i added glut32.lib on additional dependencies but these linking errors appears now.

1>链接... 1> dispfunc.obj:错误LNK2019:未解决的外部 函数"void __cdecl"中引用的符号glutSwapBuffers 显示(无效)"(?Display @@ YAXXZ)

1>Linking... 1>dispfunc.obj : error LNK2019: unresolved external symbol glutSwapBuffers referenced in function "void __cdecl Display(void)" (?Display@@YAXXZ)

1> init.obj:错误LNK2019:未解析的外部符号glutTimerFunc 在函数"void __cdecl Timer(int)"中引用(?Timer @@ YAXH @ Z)

1>init.obj : error LNK2019: unresolved external symbol glutTimerFunc referenced in function "void __cdecl Timer(int)" (?Timer@@YAXH@Z)

1> init.obj:错误LNK2019:未解析的外部符号 函数"void __cdecl Timer(int)"中引用的glutKeyboardFunc (?Timer @@ YAXH @ Z)

1>init.obj : error LNK2019: unresolved external symbol glutKeyboardFunc referenced in function "void __cdecl Timer(int)" (?Timer@@YAXH@Z)

推荐答案

您现在需要链接到glut库的64位版本,freeglut具有有效的64位lib,您可以下载

You'll need to link against a 64 bit version of the glut library now, freeglut has a working 64 bit lib which you can download here. Get the freeglut 3.0.0 MSVC package and use the freeglut.lib in the freeglut/lib/x64 folder.

如果您还没有的话,请不要忘记将在32位设置中更改的所有属性都复制到64位设置中.

Also don't forget to copy across all the properties you changed in your 32 bit settings to your 64 bit settings if you haven't already.

这篇关于Visual Studio:从win32更改为x64时,显示链接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆