Compiler Xcode error


#1

Does anyone know what this means?


#2

It means, that you declare a method getSharedAudioDeviceManager() in the MainAppWindow class, which you didn’t implement, that’s why the linker doesn’t find an implementation to link.
If you wrote that code in the cpp file, make sure, you placed MainAppWindow:: in front of the method…
N.B. the error is probably completely unrelated to the warning before


#3

It’s included in a header file that I included, that’s why I’m confused.


#4

The screenshot only shows that you are calling getSharedAudioDeviceManager() but where is that method defined (not declared)? The linker is complaining that it couldn’t find a definition for that method. Normally this would be in a cpp file, maybe the file is not being compiled, or it hasn’t been defined within the MainAppWindow namespace, or it’s been pre-processed out by some pre-processor definition?


#5

It’s defined in the same header file MainAppWindow is, and I did include it. That’s why I find this to be so odd.


#6

…so does the linker :wink:

Some ideas, what could have happened:

  • is there accidently a semicolon between the declaration and the curly braces? Can happen when copying around
  • is there a second class definition in the project with a slightly different spelling?
  • Do you have the namespace prefix inside the class?

What helps me in such cases is a project wide search fed by copy and paste, so you get spelling errors shown…

If you need further ideas, it’s best to post this class, so we can see…

Good luck