问题
I'm doing a university assignment on shared memory on C, I need to use the functions shm_open(), mmap(), ftruncate(), shm_unlink(), etc. using a Mac with macOS Mojave 10.14
My teacher told me I need to use the -lrt library in my Makefile to make it work but when I "make" I got an error which goes
ld: library not found for -lrt
clang: error: linker command failed with exit code 1
Is the library spelled work? If I don't have it, I need to download it? Do I even need a specific library? ('cause on the internet I didn't find anybody using one...) I'm very confused.
来源:https://stackoverflow.com/questions/53595529/shared-memory-library-lrt-in-c-on-macos