我想使用 clang 从 cpp 文件中获取函数名称。 我找到了一些教程,但在执行“make”时总是收到此错误:
/usr/bin/ld: error: ../../lib/libLLVMSelectionDAG.a: ELF section name out of range collect2: error: ld returned 1 exit status tools/lto/CMakeFiles/LTO.dir/build.make:269: recipe for target 'lib/libLTO.so.7.0.0svn' failed make[2]: * [lib/libLTO.so.7.0.0svn] Error 1 CMakeFiles/Makefile2:18957: recipe for target 'tools/lto/CMakeFiles/LTO.dir/all' failed make[1]: * [tools/lto/CMakeFiles/LTO.dir/all] Error 2 Makefile:149: recipe for target 'all' failed make: *** [all] Error 2
知道如何解决这个问题或任何教程吗?
提前致谢。
最佳答案
我解决了增加/dev/sda1 大小并删除文件 ../../lib/libLLVMSelectionDAG.a 的问题 之后,我只执行了“make”,它成功了。
关于c++ - 使用 Clang 获取函数定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49496088/