g++ compiling option
What are options for compile .cpp file into .s and .o without linking it.
I used g++ -s -c but it only produced .o file.
g++ -s with create undefined reference to main (because it a class im开发者_运维问答plementation not a main)
The option to generate asm files is -S
, capital S on gcc (you were using -s
).
精彩评论