setting Additional Include directories(IAR)

Thread Starter

aamirali

Joined Feb 2, 2012
412
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
 

MrChips

Joined Oct 2, 2009
30,708
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.
 

ErnieM

Joined Apr 24, 2011
8,377
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.
 
Top