CodedK/CUDA-by-Example-source-code-for-the-book-s-examples-

fatal error LNK1104: cannot open file 'glut64.lib'

tanmoyio opened this issue · 1 comments

fatal error LNK1104: cannot open file 'glut64.lib'

Hi there!

Maybe I'm a tad too late with this reply, but in order for Visual Studio to find glut64.lib, you must tell it where to actually find this library file.

To do so, right-click your project on the Solution Explorer and open the Properties tab. Here, you must change two things:

  • On the "VC++ directories" tab, edit the "Library Directories" entry to add the path where glut64.lib is. Since it is already in the lib directory of the repo, you can add a new field that is $(ProjectDir)lib.
  • Just in case, in the "Linker -> Input" tab, edit the "Additional Dependencies" entry to add a new entry that reads glut64.lib
  • However, after you do all this, you will most likely get an error saying that the program cannot find glut64.dll. To fix this, you can just move this file (in the bin directory) to the root of your project.

If you have any more doubts, please let me know!