c - 如何从另一个目录安装 GDB?
问题描述
我正在尝试在我的机器上安装 GDB,但在运行 ./configure 时出现此错误:
configure: error: GDB must be configured and built in a directory separate from its sources.
To do so, create a dedicated directory for your GDB build and invoke
the configure script from that directory:
$ mkdir build
$ cd build
$ <full path to your sources>/gdb-VERSION/configure [etc...]
$ make
于是我创建了一个新目录:/Users/SomeName/SomePath/gdb
我尝试运行以下命令:
./Users/SomeName/SomePath/gdb/configure
但这也不起作用,我收到一个错误:
-bash: ./Users/SomeName/SomePath/gdb/configure: No such file or directory
如何从另一个文件夹运行 C 程序?我第一次遇到这个问题。提前致谢!
解决方案
假设您已将 gdb 源存储在/home/SomeName/gdb-sources
并希望在单独的文件夹中构建 gdb,就像/home/SomeName/gdb-build
您需要更改并从内部gdb-build
调用configure
脚本一样。gdb-sources
gdb-build
完整示例:
mkdir /home/SomeName/gdb-build
cd /home/SomeName/gdb-build
/home/SomeName/gdb-sources/configure
make -j
推荐阅读
- python - pandas.io.sql:“顶部”或附近的语法错误
- altair - Altair“找不到名为 'selectorXXX' 的选择”错误
- laravel - Laravel Command - Method Illuminate\Database\Eloquent\Collection::update does not exist
- c# - 为什么在使用 LINQ Sum 方法时出现异常“无法将类型 'bool' 隐式转换为 'long?'”以及如何解决?
- mysql - MySQL 5.7 作为文档存储和 _id 生成
- apache-flink - Flink 指标的 Prometheus 查询示例
- ionic-framework - 您如何为 Capacitor 原生应用设置自动化测试?
- java - 如何通过按按钮更改为特定片段?
- flask - 我的烧瓶 Heroku 尝试失败,我无法查明问题
- c# - 扫射目标时如何让特工面对行进方向?(统一/C#)