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

Đạt Michio

New member
How do you create .so file from C in Linux?
Answer
There are four steps:
  1. Compile C++ library code to object file (using g++)
  2. Create shared library file (. SO) using gcc –shared.
  3. Compile the C++ code using the header library file using the shared library (using g++)
  4. Set LD_LIBRARY_PATH.
  5. Run the executable (using a. out)
  6. Step 1: Compile C code to object file.
 

Tìm kiếm

Back
Top