i’m trying to compile my programm(it’s a server that uses shared memory) and when i try to delete the shared memory(shmctl()) inside a signal handler for SIGINT i keep getting
undefined reference to `schmctl'
i searched around and saw that this usually requires something like
gcc -o server server.c -lrt
to compile,but even then i keep getting the same error.
Can anyone help me understand what i should do,and what -lrt or whatever is needed means?
-lrtmeans you are linking withlibrt.alibrary. To get rid of your error you should find the library where symbol shmctl is defined and then pass it togcc.