How to get GCC linker command?
Use gcc -v to see what commands it runs. As in, gcc -v -o hello hello.c This will print a lot of output, including the linker command. The actual output depends on the platform, but the linking command should be near the end. Alternatively, use gcc -### -o hello hello.c This is like -v, but … Read more