0

I cleanly compile using xcode's commandline cc:

cc .c -o

Execution results in:

dyld[4193]: dyld cache '(null)' not loaded: syscall to map cache into shared region failed dyld[4193]: Library not loaded: /usr/lib/libSystem.B.dylib Referenced from: <571EB7D4-425C-36E2-8C6E-B7A600074AEC> /Users/cdm/Desktop/pbc/pb Reason: tried: '/usr/lib/libSystem.B.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/libSystem.B.dylib' (no such file), '/usr/lib/libSystem.B.dylib' (no such file, no dyld cache), '/usr/local/lib/libSystem.B.dylib' (no such file) Abort trap: 6

otool -LD produces:

: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)

I'm running on a M1 Mini under a freshly reloaded Ventura 13.3.1. I have used fresh copies of xcode 14.1 and 14.3 with identical results.

/usr/lib/libSystem.B.dylib if fact does not exist.

A simple C program does not encounter this problem. It runs as K&R expected :-).

But otool on this executable produces the same as for :

: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)

I'm using the following libraries in :

#include <inttypes.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <locale.h>

Only <locale.h> seems evenly slightly likely as a source of my problem.

I am not aware of anything tricky or messy about my c code, though I do use very large blocks of memory.

My question is related to kon coder's question "When I try to run a simple executable from Cmake, I get this error." on this site.

0 Answers0