lld undefined symbol: mainCRTStartup
问题 My cpp code: int main(int argc, char** argv) {} I use the following command to compile and link it: // I want to read the result ir clang -S -emit-llvm main.cpp // I want to compile directly from ir llc -filetype=obj main.ll lld -flavor link main.obj // <root>: undefined symbol: mainCRTStartup Link failed Did I miss something? 回答1: mainCRTStartup is a function defined by the CRT (which clang is probably implicitly using in the first step, and generates an IR file with mainCRTStartup as the