"There is no class with this name" error

I wrapped some C code that we use here at my work into a plugin. The plugin works great on OS X. I then moved to Windows. After some playing with Visual Studio 2012, I have a DLL compiled and copied to the Xojo Plugins directory. Loading Xojo, everything looks create. My 5 classes are there in the code editor (tab completion), I can create new objects, the methods, properties, constants are all there in tab completion, etc…

When I hit run, however, all of my classes, constants, properties, etc… that come from the plugin are underlined in red indicating an error and in the error pane, all uses of my plugin in my code say:

“There is no class with this name”… How can I go about debugging this problem, or has someone been there done that and know what I am doing wrong? I am guessing some compile flag, but I’m only guessing.

Thanks!

Got it working. Whew. The problem? On OS X you can declare empty arrays:

REALevent CsDummyClassEvents[] = { };

On Windows, you can not. I started by turning the above into:

REALevent CsDummyClassEvents[] = { NULL, };

That didn’t work so hot because later in code, when you use _countof it was apparently returning 1 for the above array and messing everything up in Xojo. I changed 15 classes but missed 1. Though, those 15 classes changed were enough to make Xojo happy enough to let me code, get code completion, etc… Just not happy enough to run. I finally stumbled across my error and no longer declared NULL type arrays. Once I did that, all 16 classes worked beautifully.

Just incase someone else runs into the same problem…

you should not need to declare empty arrays here.
If you have no events, simply leave it away and later pass NULL, 0.

[quote=18443:@Christian Schmitz]you should not need to declare empty arrays here.
If you have no events, simply leave it away and later pass NULL, 0.[/quote]

Yeah, that’s what I eventually wound up with. I was just declaring empty arrays because there was going to be things in most of them as time goes on, but that proved to be a bad idea. Thanks!