How do you create .so file from C in Linux?

Ẽm Thư

New member
How do you create .so file from C in Linux?
Answer
  1. Step 1: Compiling with Position Independent Code. We need to compile our library source code into position-independent code (PIC): 1 $ gcc -c -Wall -Werror -fpic foo.c.
  2. Step 2: Creating a shared library from an object file. …
  3. Step 3: Linking with a shared library. …
  4. Step 4: Making the library available at runtime.
 

Tìm kiếm

Back
Top