Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在不链接的情况下将 .cpp 文件编译成 .s 和 .o 有哪些选项。
我使用了 g++ -s -c 但它只生成了 .o 文件。
g++ -s 创建未定义的 main 引用(因为它是类实现而不是 main)
生成 asm 文件的选项是-Sgcc 上的大写 S(您使用的是-s)。
-S
-s