Visual Studio : when changed from win32 to x64, its showing linking error [duplicate]

与世无争的帅哥 提交于 2019-12-12 09:26:50

问题


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>Linking... 1>dispfunc.obj : error LNK2019: unresolved external symbol glutSwapBuffers referenced in function "void __cdecl Display(void)" (?Display@@YAXXZ)

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

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


回答1:


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.

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.



来源:https://stackoverflow.com/questions/31020257/visual-studio-when-changed-from-win32-to-x64-its-showing-linking-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!