Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

Often it's better to add an include directory where the compiler looks for include files (specifically those included with < > marks).

This can be done in Atmel Studio 6: Project properties -> Toolchain -> ARM/GNU C Compiler* -> Directories -> Add Item (button with green plus sign).

*will be AVR/GNU C Compiler if using an AVR board.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top