The geometric phase is an extra phase evolution in the wave function of vibrations that is potentially applicable in a broad range of science and technology. The characteristics of the geometric phase in the squeezed state for a carbon-nanotube-based nanowire resonator have been investigated by means of the invariant operator method. The introduction of a linear invariant operator, which is useful for treating a complicated time-dependent Hamiltonian system, enabled us to derive the analytical formula of the geometric phase. By making use of this, we have analyzed the time behavior of the geometric phase based on relevant illustrations. The influence of squeezing parameters on the evolution of the geometric phase has been investigated. The geometric phase, in large, oscillates, and the envelope of such oscillation increases over time. The rate of the increase of the geometric phase is large when the parameters, such as the classical amplitude of the oscillation, the damping factor, and the amplitude of the driving force, are large. We have confirmed a very sharp increase of the geometric phase over time in the case that the angular frequency of the system reaches near the resonance angular frequency. Our development regarding the characteristics of the geometric phase is crucial for understanding the topological features in nanowire oscillations.