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

598 views Asked by At

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

There are 1 answers

0
Blarglenarf On BEST ANSWER

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.