building and linking dylib and test for mmap