The variables should be in the library and extern in the main code. Having the main code set those for the library is kind of putting the cart before the horse.
The variables should be in the library and extern in the main code. Having the main code set those for the library is kind of putting the cart before the horse.