c++visual-studioopengldll

How do I find the dependencies on a dll :: GLUT specifically


I have been learning opengl for about 4-5 months now. I am ready to stop using glut(a helper library that obfuscates many difficult / tedious aspects of opengl programming )

Problem is, I feel I have removed all refrences to glut.h, as well as all function calls within glut, but when I run my application it is still trying to link to glut32.dll.

Generally so I and others can learn for later, How can I tell which libraries an excutable/source-code need and why(function/header wise), either before or after compile?

I am using VS2010 but cross compiling this on a linux box with g++ In this specific instance I don't have the dll listed as an additional dependency . But I do see glut.h in the external dependencies folder...I just cant remove it


Solution

  • Dependency Walker is your friend for examining the dll dependencies of compiled binaries.

    The principal problem is of course, you have added glut.lib or glut32.lib to your project someplace. Its probably in the Project Properties > Linker Settings > Additional Libraries, or some source file contains a #pragma something like this :-

    #pragma comment(lib, "glut32.lib")