Location of OpenGL32.lib and other libs in Windows 10
I was trying to set up the SFML library (static) on Visual Studio Community Edition 2017. It was a bit unclear from the library’s documentation what libs to include. After few trials following is the list of libs required for SFML components.
sfml-audio-s-d.lib sfml-graphics-s-d.lib sfml-network-s-d.lib sfml-system-s-d.lib sfml-window-s-d.lib opengl32.lib winmm.lib gdi32.lib freetype.lib openal32.lib flac.lib vorbisenc.lib vorbisfile.lib vorbis.lib ogg.lib ws2_32.lib
sfml-audio-s.lib sfml-network-s.lib sfml-window-s.lib sfml-graphics-s.lib sfml-system-s.lib opengl32.lib winmm.lib gdi32.lib freetype.lib openal32.lib flac.lib vorbisenc.lib vorbisfile.lib vorbis.lib ogg.lib ws2_32.lib
And it worked!
Now, the interesting thing is that few of these libraries weren’t provided by SFML (e.g. OpenGL32.lib, winmm.lib). Certainly, these were provided by the Windows environment. After few online searches, I understood that these were installed as part of Windows SDK by the Visual Studio compiler. However, the location provided by them didn’t match for me (Windows 10). A simple search led me to the following location:
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17134.0\um\x64
It had lots of static libs including OpenGL32.lib, winmm.lib etc. So, it seems that in Windows 10 the Windows Kits get installed directly in the Program Files (x86) folder.
Few other interesting things I learned:
- Open GL is a standard, not a centrally controlled library per se. Each compiler is free to implement it in its own way.
- ls -1 -> gives files’ name in single column 😉