On 15 April 2014 09:37, Sahib Jakhar wrote: > > Can somebody please explain what are we doing wrong (if anything), and > how we can resolve this? This is not really a question about GCC, it is a question about the linker. If you want your program to link to a different library then you need to re-link it. You can't change what library it links to, a different version ofthe library might not be compatible.