Thanks for these instructions. I was able to get the basic C++ TOP working (rotating black and white rectangles). Now I’m trying to use this openFrameworks addon github.com/moostrik/ofxFlowTools I used the openFrameworks addons manager to add it. I’m able to rebuild the dll, but opening it in Touch results in a crash. Could you give any tips on my Visual Studio 2015 build settings? Maybe TouchDesigner is looking for a separate dll, but it can’t find it.
These settings are what I saw after using the addons manager.
All Configurations and all platforms:
Configuration Properties >> C/C++ >> General >>
Additional Include Directories
C:\Users\davidbraun\Documents\of_v0.9.0_vs_release\addons\ofxFlowTools\src;
C:\Users\davidbraun\Documents\of_v0.9.0_vs_release\addons\ofxFlowTools\src\drawforces;
C:\Users\davidbraun\Documents\of_v0.9.0_vs_release\addons\ofxFlowTools\src\filters;
C:\Users\davidbraun\Documents\of_v0.9.0_vs_release\addons\ofxFlowTools\src\fluid;
C:\Users\davidbraun\Documents\of_v0.9.0_vs_release\addons\ofxFlowTools\src\mask;
C:\Users\davidbraun\Documents\of_v0.9.0_vs_release\addons\ofxFlowTools\src\opticalflow;
C:\Users\davidbraun\Documents\of_v0.9.0_vs_release\addons\ofxFlowTools\src\particles;
C:\Users\davidbraun\Documents\of_v0.9.0_vs_release\addons\ofxFlowTools\src\tools;
C:\Users\davidbraun\Documents\of_v0.9.0_vs_release\addons\ofxFlowTools\src\visualisation;%(AdditionalIncludeDirectories)
update:
It seems that the declaration of opticalFlow in OpenGLTOP.h is responsible for the crash.
ftOpticalFlow opticalFlow;
I’m not sure why just a declaration would cause it to break since it compiles without any issues.
There must be work getting done during the construction of that object. Try stepping into it on the line where it’s created. If it’s declared as a member variable in your class, step into the ‘new’ line that creates your class.
I followed the instructions with the update from michela, but as soon as I drop in the line “ofSetupOpenGL(&myWindow, 0, 0, OF_WINDOW);” my dll won’t load anymore.