Does Library Link Order Matter?#
If using CMake, library link order does not matter as CMake and the libraries take care of it.
If using a different build system, it is system dependent. For Windows/OSX/macOS, it does not matter. For Android and Linux, it may matter for some underlying compilers.
Make sure that for Linux and Android, link order is in reversed order of dependencies: dependents (high level) first, to dependencies (low level) last. So the order should be:
PVRUtils, PVRCamera
PVRShell, PVRAssets
PVRCore, PVRVk
System libraries (usually:
m
,thread
for linux,android_native_app_glue
for Android)
If there are undefined references to functions that appear to be present, apart from needing a library that is not included, this is a common culprit.