C++ 使用分析工具的函数调用图选项时发生Eclipse CDT错误

C++ 使用分析工具的函数调用图选项时发生Eclipse CDT错误,c++,c,eclipse,profiling,call-graph,C++,C,Eclipse,Profiling,Call Graph,在使用分析工具的函数调用图选项时,我在EclipseCDT中遇到以下错误 /tmp/org.eclipse.linuxtools.profiling.launch14272008124383356638983332386495.sh: 2: /tmp/org.eclipse.linuxtools.profiling.launch14272008124383356638983332386495.sh: Syntax error: Bad fd number 我用谷歌搜索了这个错误。我发现问题在于

在使用分析工具的函数调用图选项时,我在EclipseCDT中遇到以下错误

/tmp/org.eclipse.linuxtools.profiling.launch14272008124383356638983332386495.sh: 2: /tmp/org.eclipse.linuxtools.profiling.launch14272008124383356638983332386495.sh: Syntax error: Bad fd number
我用谷歌搜索了这个错误。我发现问题在于
&
。答案表明,用
&>
替换它可以解决这个问题。但是如何做到这一点,因为eclipse创建了文件

下面是我正在使用分析工具的示例C代码。但我有一个巨大的代码,我面临着同样的问题

/*
 ============================================================================
 Name        : hello.c
 Version     :
 Copyright   : Your copyright notice
 Description : Hello World in C, Ansi-style
 ============================================================================
 */

#include <stdio.h>
#include <stdlib.h>

void abc() {

}

int main(void) {
    puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */
    abc();
    return EXIT_SUCCESS;
}

我在C/C++代码中遇到了相同的问题。

这可能是因为bash和sh中的样式不同。尝试以下方法:将/bin/sh的旧链接重命名为bash,并创建/bin/sh到bash的新链接

cd /bin
sudo mv sh sh_orig
sudo ln -s /bin/bash sh
cd /bin
sudo mv sh sh_orig
sudo ln -s /bin/bash sh