Problem compiling class on arm64?

I just bought a mac mini with an M1 processor with xcode 12.5 and OF 11.2. I’m trying to compile a simple app and getting linker errors for any objects declared outside of the ofApp.h and ofApp.cpp

To reproduce:
Generate empty project using project generator
Add a new .h and .cpp to the project and create a simple class:

//.h
class Test
{
public:
void testing();
};

// .cpp

#include "Test.h"

void Test::testing()
{
}

then in ofApp.h create an object of type Test and call the testing function

#pragma once

#include "ofMain.h"
#include "Dig.hpp"
class ofApp : public ofBaseApp{

	public:
		void setup();
		void update();
		void draw();
    Dig t;
		
};
#include "ofApp.h"

//--------------------------------------------------------------
void ofApp::setup(){
    t.test();
}

//--------------------------------------------------------------
void ofApp::update(){

}

//--------------------------------------------------------------
void ofApp::draw(){

}

results in error:

Undefined symbols for architecture arm64:

“Dig::test()”, referenced from:

  ofApp::setup() in ofApp.o

ld: symbol(s) not found for architecture arm64

worked out the problem. Dig.cpp wasn’t being added to the compile sources list in build phases for some reason.