I have written some code and would like to share it, but would like to ship a compiled version as apposed to the full source code. It is a library, not an actual program. I know how to create .a and .o files, but not where to put them where G++ will automatically include them. To date I have had to specify the files explicitly in the command line every time I want to use it, which is quite time consuming and irritating. Is there a way to get G++ to automatically recognize it and use it at compile time? How?