Header files not found by GCC

Work with embedded C-projects. There are libraries, files, etc. - for microcontrollers. I do not need to use GCC for the host machine and OS (Linux 64 bit battle). Usually...

But now I'm trying to compile the mspdebug project from Github - of course, with GCC. And I get an error at the very beginning of 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.

I am looking for inclusion in all possible paths (I have a list of them using the gcc -v command) - assert.h files are also missing, like stdio.h, etc. In addition to the directories of virtual mailboxes, there is only one place (where GCC does not search): / usr / lib / syslinux / com32 / include

AFAIK, all standard libraries and their components are installed with GCC. So I'm trying to reinstall GCC (4.8.4) - nothing changes.

What is the normal way to provide GCC with the entire standard environment it needs?

+4
source share
2 answers

assert.hnot a part gcc, it is a part glibc.

Most likely, your Linux distribution puts the system headers in a separate package that you need to install.

Fedora, for example, puts header files in a package glibc-headers. However, you cannot use Fedora because the Fedora package gcchas a dependency on glibc-headersit to make sure it is being pulled.

Regardless of which Linux distribution you are using, you need to investigate which distribution will install the system header files needed for the build.

+3

, , fooobar.com/questions/352949/.... :

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, - .

+2

Source: https://habr.com/ru/post/1621743/


All Articles