Try running your compile command with -v so it announces what it's doing and then use readelf & grep to verify that the symbol in question is defined/resolved in the objects you expect.