I'm having a ton of trouble ever since updating to MacOS Ventura on my M1 Pro Macbook.
I've tried everything but I have identified when the errors are actually occurring. When I call a function. I've written a very basic "Welcome" program below.
The main.cpp file is as follows
// C++
#include <iostream>
#include "declareFuncs.h"
int main() {
welcome();
}
and the "declareFuncs.h" is as follows
// C++
#ifndef UNTITLED_DECLAREFUNCS_H
#define UNTITLED_DECLAREFUNCS_H
void welcome();
#endif //UNTITLED_DECLAREFUNCS_H
and the function is defined in the following source file.
// C++
#include <iostream>
void welcome(){
std::cout << "Welcome!";
}
As you can see, it's a very basic program and should compile fine. But when I go to compile it, the compiler spits this back at me and I cannot for the life of me find a solution. I'm tempted to go buy an external drive and rollback this update.
Undefined symbols for architecture arm64:
"welcome()", referenced from:
_main in main-199bfc.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What's going wrong here? how can I fix this? It's beyond frustrating at this point.