Try using shared libraries instead. Doesn't solve everything yet..