我想了解它如何构建Android程序.你知道我在哪里可以下载com.android.build.gradle构建插件的源代码吗?
构建ac程序时vscode报错。错误信息如下。
Cannot build and debug because the active file is not a C or C++ source file.
The terminal process failed to launch (exit code: -1).
Run Code Online (Sandbox Code Playgroud)
任务配置文件如下。
{
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++ build active file",
"command": "/usr/bin/gcc",
"args": [
"-fdiagnostics-color=always",
"-g",
"/home/xxx/tmp/test/main.c"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
我在工作区文件夹 /home/xxx/tmp/test 文件夹下有名为 main.c 的 ac 文件。问题的原因可能是什么?
我正在尝试从源代码构建gdb,版本是11.1。我已经配置了 GMP 包括路径,但配置脚本仍然报错。
configure: error: GMP is missing or unusable
Run Code Online (Sandbox Code Playgroud)
我复制了配置日志。
configure:10433: checking for libgmp
configure:10453: gcc -o conftest -g -O2 conftest.c -lncurses -lm -ldl -lgmp >&5
conftest.c:53:17: fatal error: gmp.h: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我的配置命令如下所示。
configure --prefix=/home/xxx/ins/gdb_11 --with-gmp-include=/home/xxx/ins/gmp-6.2.1/include --with-gmp-lib=/home/xxx/ins/gmp-6.2.1/lib
Run Code Online (Sandbox Code Playgroud)
可能是什么问题?
源代码非常简单。
#include <signal.h>
void main() {
sigset_t set;
}
Run Code Online (Sandbox Code Playgroud)
signal.h 已包含在应定义 sigset_t 的位置中。但是vscode还是报问题。
identifier "sigset_t" is undefined
Run Code Online (Sandbox Code Playgroud)
配置文件如下。
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "c++98",
"intelliSenseMode": "linux-clang-x64"
}
],
"version": 4
}
Run Code Online (Sandbox Code Playgroud)
并且程序可以成功编译,没有错误。为什么vscode会报这个错误?