I would like to know if it is possible to use selective arduino libraries in our AVR projects. For Example: I am using Atmega328 and Atmel studio. I would like to use one of the arduino library such as DS1307 related library file(twi.c and Wire.c source files I guess) in my project. Can we use individual libraries and then include applicable header files in our build? If so where are these libraries located and what is the extension? I saw few articles on building entire arduino project in Atmel studio and I am not interested in that. I want to manage without installing arduino if possible (I can install arduino only to get library files if needed). I thought of including source files, but they are in C++ and I started getting error messages when included in C project. Is it possible to do without modifying the source files much? Basically I want to include some object files (for example as .o file and associated header file) and build along with my project.
Can we use individual libraries and then include applicable header files in our build?
Yes.
If so where are these libraries located
If you have not installed the Arduino IDE, they are at arduino.cc.
and what is the extension?
The same as every other header file.
I thought of including source files
Include how? Using #include? That would be the wrong approach.
but they are in C++ and I started getting error messages when included in C project.
Well, duh!
Is it possible to do without modifying the source files much?
Rename your files to .cpp.
Basically I want to include some object files (for example as .o file and associated header file) and build along with my project.
Where do you plan to get a .o file?
+1 karma for your informative and amusing answer.