Cannot link any C program with gcc on Mac Mojave
问题 I've just updated to OSX 10.14.6 (Mojave) and now, after upgrading Xcode and migrating MacPorts, even the simplest C program will not link with any gcc version. For example, linking the program int main() {} gives: dcs16> gcc test.c ld: library not found for -lSystem collect2: error: ld returned 1 exit status I am using gcc 6.5 in /opt/local/bin: dcs16> gcc --version gcc (MacPorts gcc6 6.5.0_4) 6.5.0 The Xcode version is 11.0 and I have installed the package (which was recommended for solving