setting Additional Include directories(IAR)

Discussion in 'Embedded Systems and Microcontrollers' started by aamirali, Jul 13, 2014.

  1. aamirali

    Thread Starter Member

    Feb 2, 2012
    I am using IAR for STM8S series.
    Go To Project->Options->C/C++ compiler->Preprocessor->Addition Include Directories.

    Here we can set path header files usually user created.

    Now problem is I made a project in IAR. In it I have my .c/.h files.
    For headers files I have given the path where they are located. I am able to successfully compile the code.
    Now I copy the entire project folder & opened that copied project. (copy is to maintain backup of codes)
    Now compiler could't open the header files, since path is now changed.

    How can I give such a path so that everytime I build the code, IAR looks for header files in the current project folder, not from where it was copied.

    This can be done in keil by giving path as '.\header'.
    But this does n't work in IAR
  2. MrChips


    Oct 2, 2009
    As far as I know, you have to remove the file from the project and then add it back using the file from the current project folder.
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    First I would start by copying my project to a different folder to make a backup, and leave my project as-is. Thus there are no issues to rebuild the project.

    To use a backup copy there are several options;

    - just replace individual files from the backup folder to the working folder.

    - move the "working" version folder to a different place (or just rename the folder) and rename the backup folder with the working folder name.

    - take the backup folder and create a new project using the files in that backup folder.