How to add header files in Atmel Studio 6

Sumudu picture Sumudu · Nov 23, 2012 · Viewed 37.3k times · Source

I'm trying to go with Atmel Atudio 6. But i'm not sure how to add .h files to my project. Is that something allowed? if so, how can i add them?

Answer

Ivar Bonsaksen picture Ivar Bonsaksen · Nov 23, 2012

If you want to add an existing .h file, you simply right-click your project in the "Solution Explorer"

If you don't have the Solution Explorer view open, you will find it under the menu item "View -> Solution Explorer").

In the pop-up menu, you then select "Add -> Existing Item..." (Ctrl+Alt+A)

Now you can browse to locate your .h file, select it and press "Add".

Notice the little drop down arrow on the "Add" button. You can use that to select whether you want to copy the .h file to your project, or just add a link to the existing file.

If you want to add a new file, right-click your project, and select "Add -> New Item..." (Ctrl+Shift+A) and select the "Include File" template.