I will answer you in a generic way:
Say an app needs libFoo.a and libBar.a to link.
The point is that if libBar.a references symbols from libFoo.a, you must link libBar.a
before libFoo.a.
Google for it if you need more technical info on why this happens.
For your app, put in the project's options the common libs (opengl32, glu32, etc) and put cavern* in each target. Then set the linker options policy for your targets to "Prepend target options to project options". This will cause cavern to be listed before opengl32 and the rest, so it will work.
Is it because of cavern using the other four that I have to link it first?
Exactly. Whichever unresolved symbols the linker encounters in cavern, it will try to resolve them in the following libs.
HTH,
Yiannis.