- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Why does the order in which libraries are linked sometimes cause errors in GCC?
Basically this kind of errors are originated from the linker in the compilation phase. The default behavior of a linker is to take the code from archive libraries when the current program needs it.
To work properly the libraries must be present in order. We can say that it must be there in the form “caller before callees”. This problem can be solved by choosing non-default behavior using flags, but in this process the linking may take larger time. Otherwise it can be solved by ordering the libraries correctly. Loaders and tsort these two can help to rearrange and correct the ordering.
Advertisements