我想使用覆蓋度來進行靜態分析,並且我需要它用於C++。由於我的項目採用了Android NDK,我配置了編譯器爲:爲ndk-build配置覆蓋率
cov-configure –comptype gcc –compiler ~/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc-4.6
然後我跑cov-build –dir coverity ndk-build –j8 NDK_DEBUG=1
一切建立,但我有一個警告
*[*WARNING] No files were emitted. This may be due to a problem with your configuration
or because no files were actually compiled by your build command.
Please make sure you have configured the compilers actually used in the compilation.**
所以我忽略了警告,跑
cov-analyze –dir coverity –all
**Coverity Static Analysis for C/C++ version 6.6.1 on Linux 2.6.38-8-server x86_64
Internal version numbers: d614fc01a4 p-eureka-push-15003.308
Looking for translation units
Error: no matching translation units.**
那麼我的編譯器配置是否正確?有沒有人以前爲Android NDK配置過編譯器?
嗨,謝謝你的回覆。編譯完成後,它會在libs文件夾下生成.so文件。我看到編譯器命令是正確的。編譯器的路徑也是正確的。你能否澄清一下,當ndk-build不編譯任何文件時,它意味着什麼。再次感謝 – largotiticaca