If that is being used in a file other than robot-config.cpp, there’s a good chance that there is no Brain.ThreeWirePort.A instance as the order that constructors are called is not guaranteed across files.
either move to the same file as where Brain is constructed or do something like this.
triport ThreeWirePort = vex::triport( vex::PORT22 );
gyro myGyro = vex::gyro(ThreeWirePort.A);