quadsort
quadsort copied to clipboard
how to compile quadsort as a so file
I have tried using this make
quadsort.o: quadsort.c quadsort.h
gcc -c -Wall -Werror -fPIC quadsort.h
gcc -shared -o libquadsort.so quadsort.o
but failed getting error
can you help me out ?
You need to create a stub to include string.h.
// lib.c
#include <string.h>
#include "quadsort.h"
Then
gcc -fpic -c lib.c -o lib.o
gcc -shared lib.o -o libquadsort.so
thank you