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.

CCS 5.4 - forced to add path to #include even if path was added to linker

Forced to add path to #include even if path was added to linker, why?

If I add to the path to linker file search path, I should be allowed to do #include "cpu.h" and not "includes/cpu.h".

  • Javier Fernandez1 said:
    do #include "cpu.h" and not "includes/cpu.h

    Hi,

     cpu.h is located in include, includes cannot be found on base installation.

  • That was only any example. IncludeS = pick your own directory(they are all the same). I should have selected a different general directory name here.

    Lets replace IncludeS with headerFiles, it is still the same problem.

    Thanks.

  • Javier Fernandez1 said:

    If I add to the path to linker file search path, I should be allowed to do #include "cpu.h" and not "includes/cpu.h".

    The linker search path is passed to the linker and specifies directories to search in for libraries and/or linker command files. There is a separate include search path that is passed to the compiler to specify directories to search in for include (header) files. These are two separate and different options. Since you mention a #include example, the path to this would need to be specified using the include search path to the compiler.