Search code examples
c++opengllnk2019

OpenGL Red Book example 1-1 error LNK2019; Problems with GLUT and GLEW, as well as many default libs


I got the Red book to expand my currently small knowledge on OpenGL, but the first tutorial is giving me nightmarish problems. You've seen a few of these, I know, but I've got LoadShaders.cpp pointed to and /NODEFAULTLIB set to yes in the project settings, and it has all come down to this last bunch of errors, all or most LNK2019's.

http://pastebin.com/2tTUtiUc Is where you can see the errors. I don't know if I should paste the code here, as you may have already seen it.

One more thing, I tried what the other posters said resolved it for them, but it doesn't resolve it for me.


Solution

  • OK, this is wierd to me, but pointing the linker to glew32.lib and freeglut.lib and disabling libcmtd.lib seemed to fix the problem. After that, I can build it with no problem. So, just to repeat, Additional dependencies is set to only glew32.lib and freeglut.lib, and ignore default libraries is set to no, and ignore libcmtd.lib.