This issue has been resolved now. One needs to set up the path to the library file in addition to adding 'm' (as mentioned in the above KBs) in the Additional Libraries tab setting. It should then compile successfully.