Hello, i am quiet new to atmel studios and have experienced some problems when it comes to adding "libraries" (just .c and .h files), and after quiet a bit of research i'v atleast started to understand.
Afther my experience i therefore wanted to make a descussion that might help other beginners.
I found that there is several ways of making it possible to include the files(telling atmel studios where it should look for the files).
1: Using the toolchain: Simply adding the path to ther drerctories (AVR/GNU XXX compiler --> derectories) the including the files at the topp of your main.
2: Adding the .c files to the Solution Explorer(right click on your project and select add).
3: Edeting the makefile, but this way simply look to hard for a newbie(also what i found to be the case in other discussions).
My problem at the moment is that the .h and .c keeps confusing me. I realize that the .c is the defenition(the code) while the .h is the decleartion but the including process confuces me.
The case is that i have several files to add, some i .c and .h couples while i also have som seperate .h files.
Is it so that by including the .c file the couple would be good because the .c would itself include the .h file, while the rest of my .h files would have to be included seperately?
I keep seeing that people get told to add only the .c files while i also keep seeing code with included .h files.