Hi. Lately my Arduino code's been running large in lines, so I've decided to switch to Atmel Studio for a more organized IDE (plus simulation!). As per the link on the Arduino Playground (http://playground.arduino.cc//Main/DevelopmentTools) I went over Engblaze's tutorial and I was succcessful! Atmel Studio now compiles and uploads Arduino code to my Uno.
However, I didn't like the fact that I had to include the Arduino core library in its archive form (core.a or libcore.a) in the project. I wanted the library to be included as source files into my project, so that, as a curious man, while developing my project I can look into those files to see exactly what the Arduino functions do, and how they do it. So I modified my Atmel Studio project by 1) removing the libcore library and its corresponding search path in the project's linker settings, and 2) adding all the .cpp and .c files from the \hardware\arduino\cores\arduino\ & \hardware\arduino\cores\arduino\avr-libc\ directories into my project. I figured Atmel Studio would automatically form the library from these files during the build process - afterall, if you watch Arduino's own terminal output, Arduino uses the same files to create the core.a library first, then links to it the Arduino code file. Problem is, when I build my project after all this, I get the error "pins_arduino.h: No such file or directory" from line 9 of the Arduino.h file. I don't get it. What went wrong and how can it be fixed? I already have the directory containing the pins_arduino.h file included in my compiler settings. So why this error?