Reputation: 774
Is there a way to list all the installed libraries and/or query if a specific library is installed with gcc? I want to know if glut is available on my system (without browsing all the library path).
I am using mingw w/ gcc 4.5.2 under windows.
Upvotes: 2
Views: 3149
Reputation: 2049
I believe your best bet is to try to compile and link a simple example. Gcc will complain about any libraries it can't find.
You may also try to use a smart IDE (CDT) and try to auto-complete your #include statement. That may as well list all your installed libs.
Upvotes: 1
Reputation: 76579
The way to check will generally be platform and compiler dependent. Getting it 100% right is hard.
You can use a build system like CMake for generating your actual build system (confused yet ;-)
?)
I found a small tutorial which explains how to find glut for you. Essentially, all you need is
find_package(GLUT)
in your CMakeLists.txt
. To get to know cmake, I suggest you read/follow their tutorial
Upvotes: 1