gpt4 book ai didi

linux - GCC 找不到头文件

转载 作者:IT王子 更新时间:2023-10-29 01:13:37 24 4
gpt4 key购买 nike

使用嵌入式 C 项目。有库、包含文件等 - 用于微 Controller 。我不需要将 GCC 用于主机和操作系统(Linux Mint 64 位)。通常...

但现在我正在尝试编译 mspdebug来自 Github 的项目——当然还有 GCC。我在 make 的一开始就得到了一个错误:

mspdebug$ make
cc -DUSE_READLINE -O1 -Wall -Wno-char-subscripts -ggdb -I. -Isimio -Iformats -Itransport -Idrivers -Iutil -Iui -DLIB_DIR=\"/usr/local/lib/\" -o util/btree.o -c util/btree.c
util/btree.c:19:20: fatal error: assert.h: No such file or directory
#include <assert.h>
^
compilation terminated.

我在所有可能的路径中搜索包含(我通过 gcc -v 命令获得了它们的列表)——没有 assert.h 文件,也没有 stdio.h 等等。除了虚拟框目录,只有一个地方(GCC 不搜索包括):/usr/lib/syslinux/com32/include

据我所知,所有标准库和包含文件都与 GCC 一起安装。所以我尝试重新安装 GCC (4.8.4) - 没有任何变化。

为 GCC 提供它需要的所有标准环境的正常方法是什么?

最佳答案

感谢 Sam Varshavchik 设定的正确方向我找到了信息 in the stackoverflow .所以我做了以下事情:

1) 安装构建必备:

sudo apt-get install build-essential

2) 安装了 libusb(因为我尝试构建软件包时发现没有 usb.h):

sudo apt-get install libusb-dev

没关系! mspdebug (v.023) 已编译并测试成功!

因此,Linux Mint 17.2(至少)需要安装一些库到 GCC,最基本的是 build-essential。

关于linux - GCC 找不到头文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34466969/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com