Creating library files in C

Thread Starter

Santosh_16k

Joined Aug 19, 2011
19
I wished to create my own library files for LCD n timers of ATmega128. I use AVR studio to program. Can you tell me how should I create library files, so that while coding I just include them in the code?
 

Brownout

Joined Jan 10, 2012
2,390
I don't use AVR studio, however most of the programming environments I do use have procedures for creating libraries, so I suggest you find the section in your documentation that describes library creation. Otherwise, you can just create a directory on your development system where you put library files and just statically link them.
 

MrChips

Joined Oct 2, 2009
30,618
Create your own library file and give it a name such as "mylib.c"

Just include the library in your program using:

#include "mylib.c"
 
Top