开发者

g++ compiling option

开发者 https://www.devze.com 2023-03-31 07:52 出处:网络
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.

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号