Can't find type with this name error

I bit the bullet and updated my plugin to universal. It builds fine in Xcode 14, and Xojo seems to load it along with all my other MBS plugins, but when i try to run even an empty project I get this error:

First of all, my plugin has no type ‘PtrsourceImageData’, in fact searching for this string in my Xcode project comes up blank. But one of my first functions has this declaration:

static long copyCurSelectionMask (Ptr sourceImageData, long dirNum, long imageWidth, long imageHeight, Ptr prevSelectionMaskData, long bytesPerSample)

So it seems that Xojo, or Xcode, collapsed the first argument into a single ‘PtrsourceImageData’ string which is of course wrong. No idea why this would be.

I cleared the xojo caches, tried on a brand new account (MacOS ventura on a silicon mac), rebooted as per previous suggestions with this issue, tried with the latest Xojo 2024r1.1, all without any luck. Even a bare-bones project (that does not call this plugin function) fails with the same error on run, with either x86_84, arm64, or universal targets (BTW my plugin has separate Mac x86_84 and Mac arm64 dylibs).

My previous x86_64-only plugin built and ran fine (natively on older iMacs, and under Rosetta on silicon Macs of course).

I am stumped, and would appreciate any insights. Many thanks.

Maybe check to make sure that’s really a Chr(32) space in between those two words?

excellent thought Eric, but alas, it was a chr(32) and the error persists

Problem solved: it was just about as trivial as what you suggested Eric: I had an error in my:

REALmethodDefinition ITRKpluginMethods = {
{ (REALproc)…

definition, inside the string definition of the function for Xojo, so Xcode didn’t care, but Xojo choked on this incorrect declaration.
I hate these ones, trivial but still burned a couple of hours…