This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Include header files

Hi,

I am using CCSv5.5 and ARM core of TMS320C6A8167 board and want to include the following files in my project:

#include <stdio.h>
#include </usr/include/linux/socket.h>
#include </usr/include/netinet/in.h>
#include </usr/include/arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include </usr/include/unistd.h>
#include <errno.h>
#include <string.h>
#include </usr/include/x86_64-linux-gnu/sys/types.h>
#include </usr/include/features.h>

but the compiler keeps throwing errors that it can not pen feature.h file which is required by socket.h and in.h  I tried linking the files fom Project-->Properties but got no success. Can anyone please give the method to include the above files in the project. I also tried to link the whole folder usr/include in the linker resource optin but then also failure.

Thanks

  • Raunak Kalani said:
    but the compiler keeps throwing errors that it can not pen feature.h file which is required by socket.h and in.h 

    You need to add the path to the header file in the Compiler's Include Options. Please see this page: 
    http://processors.wiki.ti.com/index.php/Compiler/diagnostic_messages/5

  • Hi,

    I have specified the paths of the files which I can(#include </usr/include/linux/socket.h> #include </usr/include/netinet/in.h> #include </usr/include/arpa/inet.h>) but what about the files that they themselves include. like socket.h has a include statement for a features.h file. and as these files are read only I cannot change the paths of these internal include files.
  • Raunak Kalani said:
    but what about the files that they themselves include. like socket.h has a include statement for a features.h file. and as these files are read only I cannot change the paths of these internal include files.

    You do not need to change their paths, just add their path to the Compiler's Include options. Not sure whether you are using the TI compiler or GCC compiler, so the place to add this may be slightly different but the idea behind it remains the same. 

    As a reference, for the TI compiler, the compiler searches for include files using the rules described in Section 2.5.2 of the ARM Compiler Users Guide.