justinfrankel / reaper-sdk

REAPER C/C++ extension SDK
125 stars 20 forks source link

"reaper_plugin.h" - unnamed class used in typedef name cannot declare members #3

Open AlexFundorin opened 3 years ago

AlexFundorin commented 3 years ago

I've updated mini SDK to make my Novation SL MkII CSurf plugin compile under VS2019 (was initially written with VS2017). Now I'm getting error C7626 "unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes" for reaper_plugin.h, line 363. Any ideas of how to fix that?

AlexFundorin commented 3 years ago

I sorta fixed it by giving a name to the class.

There's also an issue with included "afxres.h" in res.rc. I found that changing it to "windows.h" can solve this issue, which I did, but, frankly, I'm not fond of manually editing your code. Also, in case of SDK updates, I would need to re-edit it every time.

But, even, though, afxres error was seemingly solved by this, I keep getting more and more errors, from the same file. The might be related.

For example, 'RC2104 undefined keyword or key name: IDC_STATIC res.rc 60'

I have no idea of how to fix this and need some proper help. Thanks, Justin.

AlexFundorin commented 3 years ago

I suspect that this IDC_STATIC should be defined in the resource.h header, but, it isn't there.

UPD. Added this with -1 to resource.h and added typedef a name again, cause I've rewritten my edits with the original SDK files. We'll see if this would help or not.

justinfrankel commented 2 years ago

Ah, try changing afxres.h to winres.h, that should also fix the IDC_STATIC issue?