存档

文章标签 ‘pthread’

clang: warning: argument unused during compilation: '-pthread'

2015年12月9日 1 条评论

编译gtest时报了一个警告错误,查询发现有人说重装clang,可是我不会重装,不想折腾一直是使用自动升级来更新xcode。 c++ -isystem ../../googletest/include -isystem ../include -g -Wall -Wextra -pthread -lpthread gmock_test.o gmock_main.a -o gmock_test clang: warning: argument unused during compilation: '-pthread' 后来发现so上有一篇纪实,也就是说clang时编译时使用这个参数,链接的时候时不使用这个参数的,所以可以忽略这个警告。 clang requires -pthread when compiling but not when linking. This is annoying...

分类: 技术 标签: ,