cshared-libraries

C language Libraries are precompiled. Then how is it linked in a different processor based computer?


Libraries are pre-compiled, whether they are static or dynamic. Thus if I compile a library in my computer (say an intel processor), how is my library going to help or "understood" when it is linked to source files in a different processor based computer? Libraries are at the end of the day object files. So how is a it gonna work for a different processor?


Solution

  • They do not work. You have to compile a new version for the second processor using a compiler specific to that processor.