FIXED: C++ CPLUSPLUS backward compatibility

I recently tried to dust-off and re-use a cplusplus TOP made in 2015, but it crashes Touch. It did work in an 088 install however.

A look at the source shows TOP_CPLUSPLUS_API_VERSION changed from 7 to 10 sometime between 088 and 099.

  1. Is there a change log for the API versions?
  2. Would it be possible to add an API version dropdown to the CPLUSPLUS TOP parameters, to support backward compatibility with old DLLs?

Re-compiling isn’t always practical. I remember it taking days to get my environment setup and even more days to get all the library dependencies re-compiled so they would play nice together.

Thanks!

Your C++ TOP returns the API version it was written against, so I use that to keep backwards compatibility. If it’s crashing then it may be a bug with that though. It’s certainly something I try to maintain.

Would it help for me to post some files here?

If we can get it working other people might find this DLL useful - it provides openCV optical flow and feature recognition. People have asked bout it before but I never had time to post it.

I went ahead and put it on Github

1 Like

Thanks. This is actually a bug in the C++ TOP code. Specifically getInfoDATSize() is saying it’s going to return X rows, but then getInfoDATEntries() can return nothing for row index > 0 in some cases. The behavior of the two functions should match up (it should say it’s only returning 1 row if that’s the case).
I’ve tweaked the code on the TouchDesigner side to avoid the error though, so your .dll will load up without issue in the next builds.

2 Likes