I am trying to compile my C++ file like this:
g++ -g -O2 -std=gnu++17 -static sol.cpp
But, I get the following error:
ld: library not found for -lcrt0.o clang: error: linker command failed with exit code 1 (use -v to see invocation)
If I remove the -static
flag the error goes away, but I can't find the error source. My operating system is macOS.
没有评论:
发表评论