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.

CODECOMPOSER: Search paths not helping the compiler to find .C files

Part Number: CODECOMPOSER


HI,

Is this the place to ask newbie questions regarding CCS?

I am wondering why I am putting #include search paths for header files (.h) into the properties>include options>search paths and then having to put a copy of the code that the header file pertains to into the project as the system can't otherwise find the .c file for a particular header even if it is in the same folder as the header file?

Thanks, Nigel

  • Hello Nigel,

    Are you physically adding the header file to the project folder or are you linking it to the project from a location outside the project folder? Where exactly is the header file (physically) in the file system (what is the absolute path)? And how is the the C source file referencing it (what is the #include line)?

    Thanks

    ki

  • Hello Ki,

    Ok, this must be some sort of learner problem.. I was working though the exercise at the end of LAB 3 in the Getting Started with the Tiva TM4C123G LaunchPad Workshop. I was trying to use the Buttons API.

    The header (.h) files are called up by #include and found through paths in the project Properties>Build>ARM Compiler>Include Options. I was expecting the compiler to be able to also find the code for those header files (.c) which is stored in the same folder as the header files but it seemed I had to make a separate link to the "input" files in the project otherwise the compiler would not find the .c file.

    But now I have just deleted the link to the buttons.c file in the project and it is still compiling!

    I am not sure what I was doing wrong but it seems to be working as I expect now.

    I thought I had better respond to your help in any case.

    Thanks for your help,

    Best regards, Nigel