C++ 叮当声是什么++-c旗怎么办?
-c标志在以下命令中起什么作用C++ 叮当声是什么++-c旗怎么办?,c++,shell,unix,clang,clang++,C++,Shell,Unix,Clang,Clang++,-c标志在以下命令中起什么作用 clang++ -std=c++11 -g -Wall -stdlib=libc++ -isystem testing/gtest-1.7.0/include -Itesting/gtest-1.7.0 -pthread -c testing/gtest-1.7.0/src/gtest-all.cc 我在文档()以及帮助消息(clang-cc1--help)中查找了该标志,但似乎找不到答案。使用-c标志告诉编译器您不想构建程序(链接到可执行文件中),只需将这个特
clang++ -std=c++11 -g -Wall -stdlib=libc++ -isystem testing/gtest-1.7.0/include -Itesting/gtest-1.7.0 -pthread -c testing/gtest-1.7.0/src/gtest-all.cc
我在文档()以及帮助消息(
clang-cc1--help
)中查找了该标志,但似乎找不到答案。使用-c
标志告诉编译器您不想构建程序(链接到可执行文件中),只需将这个特定文件编译成一个对象文件——通常生成一个名为something.o或something.obj的文件——在本例中是gteger all.cc
(请注意,此标志在几乎所有可用的编译器中都是通用的—从1990年代的Turbo C到MS、Gnu和LLVM/Clang的最新版本)
man Clang++
OPTIONS
Stage Selection Options
-E Run the preprocessor stage.
-fsyntax-only
Run the preprocessor, parser and type checking stages.
-S Run the previous stages as well as LLVM generation and optimization stages and target-specific code generation, producing an assembly file.
-c Run all of the above, plus the assembler, generating a target ".o" object file.
男人的叮当声是你的朋友
OPTIONS
Stage Selection Options
-E Run the preprocessor stage.
-fsyntax-only
Run the preprocessor, parser and type checking stages.
-S Run the previous stages as well as LLVM generation and optimization
stages and target-specific code generation, producing an assembly
file.
-c Run all of the above, plus the assembler, generating a target ".o"
object file.
这个问题似乎离题了,因为OP不想费心阅读手册页。