header files not found, Eclipse

998 views Asked by At

Using eclipse and I am imported an already existing project. Some header files that it is using are located outside the project so it is not able to find them. So I imported the folder (file->import->general->filesystem) where the file is located. After compiling again, it is still complaining about not finding the header files, so I thought maybe there was a path problem for the compiler. Went to project->properties->c/c++ general->path and symbols, and added the path under the include tab for both the GNU C and GNU C++ entry. That did not solve the issue.

I have noticed the new path I added (host/common/include) does not show up in the gcc command.
Am I not adding it in the right place?

nios2-elf-gcc -xc -MP -MMD -c -I-I -Isrc -I-I -I../../../../../../../fpga_common/include -I-I -I../../../../../../../host/libraries/libbladeRF/include -I../bladeRF_nios_bsp//HAL/inc -I../bladeRF_nios_bsp/ -I../bladeRF_nios_bsp//drivers/inc -pipe -D__hal__ -DALT_NO_C_PLUS_PLUS -DALT_NO_CLEAN_EXIT -D'exit(a)=_exit(a)' -DALT_NO_EXIT -DALT_USE_DIRECT_DRIVERS -DALT_NO_INSTRUCTION_EMULATION -DALT_USE_SMALL_DRIVERS -DSMALL_C_LIB -DALT_SINGLE_THREADED -Os -g -Wall -Wextra -Wno-unused-parameter -DBLADERF_NIOS_BUILD -mno-hw-div -mno-hw-mul -mno-hw-mulx -o obj/default/common/src/conversions.o common/src/conversions.c

Any ideas what can be wrong? Or what I have done wrong? Here's a screen shot of the project window. Example, Convertion.c includes convertion.h Files in project window

Solution to problem 1. There was a make file in the project directory that I needed to add the path to.

Now the problem is it can't find windows.h and intrin.h. Not sure how to fix that yet.

1

There are 1 answers

0
jgorostegui On BEST ANSWER

You need to install some depenncies to have the missing headers files:

For windows.h:

In my computer is located at:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include

It is installed alongside with Visual Studio 2013, so you'll probably need to download some Windows SDK for Windows from Microsoft:

https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk

For intrin.h:

Once again you'll need some external header files:

MinGW has intrin.h but it is called x86intrin.h, so you'll need to replace the header call. See the source with the same problem with you: How to cope with "intrin.h: No such file or directory"?