When you link your libraries, use the -shared flag to create a shared library (.so). For example, to link the echo_input.c example, you type:
gcc -shared -o echo_input.so echo_input.o
If your function depends on third-party or other libraries, you must statically link them.
To see examples of the linking flags in use, review the Makefiles provided in the API directory, sqlmr-sdk/example.